-
Notifications
You must be signed in to change notification settings - Fork 160
igxAutocomplete Specification
Nikolay Alipiev edited this page Jan 17, 2019
·
19 revisions
- Revision history
- Overview
- Acceptance criteria
- User Stories
- Functionality
- Test Scenarios
- WAI-ARIA Considerations
- API - Output events - Input properties
- Assumptions and Limitations
- References
Version | Author | Date | Notes |
---|---|---|---|
0.1 | Radoslav Karaivanov | 2019-01-08 | Initial Draft |
0.2 | Nikolay Alipiev | 2019-01-17 | Test scenarios and igxAutocompleteHighlightMatch
|
0.3 | Nikolay Alipiev | 2019-01-17 | Assumptions and Limitations & References sections |
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
-
Drop down opening
- Do not open when input is focused
- Do not open when
igxAutocompleteDisabled
is true - Open when start typing in the input
- Do not open browsers' autofill drop down
-
Drop down closing
- Blur
- ESC
- Select item with click or ENTER
-
Drop down navigation
- Navigate through items with Arrow Up/Down
- Auto highlight first match when
igxAutocompleteHighlightMatch
is true
-
Item selection
- Update model on item selection
-
Templating
-
Custom filtering
-
ARIA
-
Textarea
-
Integration with other components
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) -> boolean
which will act as a filtering condition for the suggestion panel. -
igxAutocompleteSettings
: OverlaySettings to be applied when rendering the suggestion panel. -
igxAutocompleteItemTemplate
: ATemplateRef
which when passed in will allow the users custom templating. -
igxAutocompleteDisabled
: Enable/disable the directive. Does not affect the host component/element. -
igxAutocompleteHighlightMatch
: Highlight first match in the drop down
- igxAutocompleteSettings will be limited to positioning strategy settings
ARIA 1.1 Combobox role and ARIA 1.1 Combobox with Listbox Popup Examples