useSearchFieldState

Provides state management for a search field.

installyarn add react-stately
version3.21.0
usageimport {useSearchFieldState} from 'react-stately'

API#


useSearchFieldState( (props: SearchFieldProps )): SearchFieldState

Interface#


Properties

NameTypeDescription
valuestringThe current value of the search field.

Methods

MethodDescription
setValue( (value: string )): voidSets the value of the search field.

Example#


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