Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/@react-types/autocomplete/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<Aria
* @default 'input'
*/
menuTrigger?: MenuTriggerAction,
/** Handler that is called when the SearchAutocomplete is submitted.
*
* A `value` will be passed if the submission is a custom value (e.g. a user types then presses enter).
* If the input is a selected item, `value` will be null.
*
* A `key` will be passed if the submission is a selected item (e.g. a user clicks or presses enter on an option).
* If the input is a custom value, `key` will be null.
*/
onSubmit?: (value: string | null, key: Key | null) => void,
/** An icon to display at the start of the input. */
icon?: ReactElement | null
Expand Down