You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,16 +22,23 @@ The `items` attribute should contain a json string of option project. The `label
22
22
23
23
## Events
24
24
25
-
-`autocomplete-search` sent when the value of the input changes and is greater than the `minlength`, debounced by the specified interval.
26
-
-`autocomplete-commit` sent when an item is selected either by pressing Enter or clicking an option
27
-
-`autocomplete-close` sent when the element is open and loses focus, on by user pressing Escape
25
+
-`autocomplete-search` sent when the value of the input changes and is greater than the `minlength`, debounced by the specified interval. It will contain a detail with the following properties:
26
+
-`name` the value of the name attribute for the element. Useful if you have multiple autocompletes sending events to the same back end handler
27
+
-`query` the value the user has typed into the search input
28
+
-`autocomplete-commit` sent when an item is selected either by pressing Enter or clicking an option. It will contain a
29
+
detail with the following properties:
30
+
-`name` the value of the name attribute for the element. Useful if you have multiple autocompletes sending events to the same back end handler
31
+
-`value` the value for the selected option
32
+
-`autocomplete-close` sent when the element is open and loses focus, or by user pressing Escape
28
33
29
34
## Attributes
30
35
31
36
-`name` This is a required attribute for setting the correct FormData value. It works exactly the same way as the `name` attribute of any other form input.
32
-
-`clear-list-on-select` If true, will cause the options list to have it's children removed when an `autocomplete-commit` event is about to be dispatched.
33
37
-`debounce` The time in milliseconds to debounce before sending an `autocomplete-search` event when the user enters text into the input
34
38
-`value` The value which will be initially used to populate the `FormData` of the associated form.
39
+
-`display-value` this will appear when the element is in the closed state, with an icon next to it indicating
40
+
the user can click to search for options
41
+
-`min-length` the number of characters the user needs to type to trigger a search.
35
42
-`searchValue` The value which will initially be used to populate the search input.
36
43
-`open` The element will start in the Open mode display the text input
37
44
-`label-property` The property of each item that will be used as the displayed label, defaults to `name`
0 commit comments