useSearchFieldState

Provides state management for a search field.

installyarn add @react-stately/searchfield
version3.0.0-rc.2
usageimport {useSearchFieldState} from '@react-stately/searchfield'

API#


useSearchFieldState( (props: ValueBase<string> )): SearchFieldState

Interface#


NameTypeDescription
valuestringThe current value of the search field.
setValue( (val: string, , ...args: any )) => voidSets the value of the search field.

Example#


See the docs for useSearchField in react-aria for an example of useSearchField.