NgDocStringListControlComponent
The playground control of string[] inputs: a chip combobox (). Typed text is an item as it is, and a double click, Enter or F2 edits a chip in place.
- Decorators
@Component - Selectors
ng-doc-string-list-control - Extends
NgDocListControl <string>
@Component ({ … })
export class NgDocStringListControlComponent
extends NgDocListControl <string> { … }Members
Constructor1 | |||||||||||||||||
() | — | ||||||||||||||||
Signature | |||||||||||||||||
Properties31 | |||||||||||||||||
announcement: | What the live region announces: the new position of a moved item. | ||||||||||||||||
canReset: | Whether Reset is shown: the value differs from the default. | ||||||||||||||||
change: (value: T | null) => void | — | ||||||||||||||||
changeDetectorRef: | — | ||||||||||||||||
config?: DIControlConfig<TModel, TChildModel> | undefined | — | ||||||||||||||||
default: | Default value of the input; Reset returns to it. | ||||||||||||||||
disabledValue: | — | ||||||||||||||||
dragIndex: | The position of the chip being dragged, or | ||||||||||||||||
editing: | The position of the item edited in place, or | ||||||||||||||||
editInvalid: | Whether the field that edits an item holds text that is not an item. | ||||||||||||||||
editText: | The text of the field that edits an item in place. | ||||||||||||||||
elementRef: | — | ||||||||||||||||
expanded: | Whether the reader asked for the dropdown, by typing, clicking or an arrow key. | ||||||||||||||||
freeText: true | Whether typed text becomes an item ( | ||||||||||||||||
highlighted: | The position of the highlighted row of the dropdown, or | ||||||||||||||||
id: string | The prefix of the IDs of the parts of the control. | ||||||||||||||||
incomingUpdate?: ((value: T | null) => void) | undefined | — | ||||||||||||||||
invalid: | Whether the text field holds text that is not an item, such as a word in a | ||||||||||||||||
items: | The items of the value; none when the value is not an array. | ||||||||||||||||
literal: | The text shown instead of the items when the value is not an array ( | ||||||||||||||||
model: | — | ||||||||||||||||
ngControl: | — | ||||||||||||||||
panelOpen: | Whether the dropdown is open: the reader asked for it and it has rows, or, for a union, says that no value matches the typed text. | ||||||||||||||||
panelWidth: | The width of the dropdown: the width of the field. | ||||||||||||||||
renderer: | — | ||||||||||||||||
rows: | The rows of the dropdown: the values of | ||||||||||||||||
shownItems: | The items as the chips show them: in the order of a drag in progress. | ||||||||||||||||
tabStop: | The position of the chip in the tab order; the others are reached with the arrow keys. | ||||||||||||||||
text: | The text of the text field. | ||||||||||||||||
texts: | — | ||||||||||||||||
touch: () => void | Function that should be used to make control touched. | ||||||||||||||||
Accessors3 | |||||||||||||||||
get disabled: boolean | Returns true if the control is disabled. | ||||||||||||||||
set disabled: boolean | — | ||||||||||||||||
get hasValue: boolean | Returns true if the control is not empty. | ||||||||||||||||
Methods24 | |||||||||||||||||
(): void | Stops following the pointer; a drag in progress leaves the items as they were. | ||||||||||||||||
Signature Returns void | |||||||||||||||||
(): readonly T[] | The values that the dropdown can list, before the typed text filters them: for an array of strings or numbers, the items of the default and the removed items that the array doesn't hold. Plain arrays may hold an item twice, so typed text that is an item is added again, but the suggestions never repeat an item. | ||||||||||||||||
Signature Returns readonly T[] | |||||||||||||||||
(…): void | Handles the keys of a focused chip. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Starts to follow a pointer that went down on a chip. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Drags the chip once the pointer has moved far enough, and moves it in front of or behind the chip under the pointer once the pointer passes that chip's middle. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Drops a dragged chip: the items take the order of the drag. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): string | The text of a chip: the item's text, or | ||||||||||||||||
Signature Parameters
Returns string | |||||||||||||||||
(): void | Ends an edit when its field loses the focus: with the text when it is an item. | ||||||||||||||||
Signature Returns void | |||||||||||||||||
(…): void | Handles the keys of the field that edits an item: Enter keeps the text, Escape the item. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Opens the dropdown when the reader clicks the field, and focuses the text field when the click is not on a chip or a button. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Handles the keys of the text field. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): string | The text of an item. | ||||||||||||||||
Signature Parameters
Returns string | |||||||||||||||||
(…): void | Closes the dropdown and marks the control as touched when the focus leaves the control. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(): void | — | ||||||||||||||||
Signature Returns voidOverloads
| |||||||||||||||||
(…): string | Reads typed text as an item. | ||||||||||||||||
Signature Parameters
Returns string -The item, or | |||||||||||||||||
(…): void | Picks a row of the dropdown: adds its value, or removes a picked value of a union. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Method is called by the forms API. | ||||||||||||||||
Signature Parameters
Returns voidOverloads
| |||||||||||||||||
(…): void | Removes an item. The focus goes to the chip that takes its place, the previous chip, or the text field when the field had it, or no chip is left. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(): void | Sets the value back to the default of the input. | ||||||||||||||||
Signature Returns void | |||||||||||||||||
(…): string | The ID of a row of the dropdown, which the text field names as its active descendant. | ||||||||||||||||
Signature Parameters
Returns string | |||||||||||||||||
(…): void | Edits an item in place: its chip becomes a text field. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Reads the text field as the reader types. | ||||||||||||||||
Signature Parameters
Returns void | |||||||||||||||||
(…): void | Updates the model of the current control. This is the main method that should be used to update the model. | ||||||||||||||||
Signature Parameters
Returns voidOverloads
| |||||||||||||||||
(…): void | Method is called by the forms API to write to the view when programmatic changes from model to view are requested. | ||||||||||||||||
Signature Parameters
Returns voidOverloads
| |||||||||||||||||