-
Notifications
You must be signed in to change notification settings - Fork 156
igxAutocomplete Specification
Radoslav Karaivanov edited this page Jan 8, 2019
·
19 revisions
- Revision history
- Overview
- Acceptance criteria
- User Stories
- Functionality
- WAI-ARIA Considerations
- API - Output events - Input properties
| Version | Author | Date | Notes |
|---|---|---|---|
| 0.1 | Radoslav Karaivanov | 2019-01-08 | Initial Draft |
The igxAutocomplete directive provides a way to enhance a text input by showing a panel
of suggested options provided by the developer.
The simplest use-case for an end-user should be attaching the directive to an input element and providing an array of possible values for the autocomplete behavior.
Example:
<input type="text" [igxAutocomplete]="completions" />- Pass an array of data which will act as the source for autocompletion.
- Keyboard navigation both inside the drop down panel and the text input while keeping the focus inside the text input.
- Selection; with mouse/touch and keyboard.
- A condition function for filtering the passed items for the user. A sane default should be provided off the shelf and the user should be able to provide a custom one.
-
[Open for consideration] - the default condition will be case-insensitive
startsWith
-
[Open for consideration] - the default condition will be case-insensitive
As a developer, I want to be able to:
- provide my own template for the items in the suggestion panel.
- provide my own function which will act as a filter for the items displayed in the suggestion panel.
- control and modify where and how is the panel rendered.
- listen to and react when a end-user selects an item from the panel.
- TBD
- TBD
Please follow the guidelines for a combo with a listbox popup defined here.
Open for consideration
-
onItemSelected: a cancelable event which is emitted when a selection is made through mouse/touch/keyboard interaction.
Open for consideration
-
igxAutocomplete: an array of objects acting as a "data source" for the suggestion panel. -
igxAutocompleteCondition: a user provided function with the signature(value: any, term: any) -> booleanwhich will act as a filtering condition for the suggestion panel. -
igxAutocompleteSettings: OverlaySettings to be applied when rendering the suggestion panel. -
igxAutocompleteItemTemplate: ATemplateRefwhich when passed in will allow the users custom templating. -
igxAutocompleteDisabled: Enable/disable the directive. Does not affect the host component/element.