UseAutocompleteProps
Properties
If true
, the portion of the selected suggestion that the user hasn't typed, known as the completion string, appears inline after the input cursor in the textbox. The inline completion string is visually highlighted and has a selected state.
If true
, the first option is automatically highlighted.
If true
, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.
Control if the input should be blurred when an option is selected:
If true
, the input's text is cleared on blur if no value is selected.
If true
, clear all values when the user presses escape and the popup is closed.
The component name that is using this hook. Used for warnings.
The default value. Use when the component is not controlled.
If true
, the input can't be cleared.
If true
, the popup won't close when a value is selected.
If true
, will allow focus on disabled items.
If true
, the list box in the popup will not wrap focus.
A function that determines the filtered options to be rendered on search.
If true
, hide the selected options from the list box.
Used to determine the disabled state for a given option.
Used to determine the key for a given option. This can be useful when the labels of options are not unique (since labels are used as keys by default).
Used to determine the string value for a given option. It's used to fill the input (and the list box options if renderOption
is not provided).
If true
, the component handles the "Home" and "End" keys when the popup is open. It should move focus to the first option and last option, respectively.
If true
, the highlight can move to the input.
The input value.
Used to determine if the option represents the given value. Uses strict equality by default. ⚠️ Both arguments need to be handled, an option can only match with one value.
Callback fired when the value changes.
Callback fired when the popup requests to be closed. Use in controlled mode (see open).
Callback fired when the highlight option changes.
Callback fired when the input value changes.
Callback fired when the popup requests to be opened. Use in controlled mode (see open).
If true
, the popup will open on input focus.
Array of options.
If true
, the input's text is selected on focus. It helps the user clear the selected value.