AutoComplete (code)
AutoCompletes are input fields where a user is suggested several options, based on the input they provide.
Selected value:
Props
System Props
System Props
Next to the properties listed in the propstable, a collection of system props can be added to any component for further general styling and layouting purposes. These props vary per component.
To read more about the system, click here to check out its dedicated page.
ForceSelection
Make sure a user selects one of the selections
Selected value:
Suggestions
is a list of strings that may be suggested to the user, based on their input.
OnChange
is triggered on every change made by the user, so when the user types or when user selectes a suggested value, either by keyboard or mouse.
Selected value:
OnInputChange
In contrast to , is only triggered when the user types in the input field. The reason this is separated, is to reduce potential API calls when the suggestions are fetched from an API (e.g. streets in an addressform).
Note: when you supply the property, the component will no longer automagically filter suggestions on typing. We assume that, since you're using the value of the input yourself, you will provide the updated suggestions to the prop.
Selected value:
Search term for API:
Loading
To indicate to a user that, based on their input an API call is being called, you can set the prop to true.
Selected value:
Search term for API:
IconLeft
For further illustration purposes, you can provide an .
Label Props
As with other input elements, also has a wide range of extra properties to convey even more meaning.