useSearchFieldState
Provides state management for a search field.
install | yarn add @react-stately/searchfield |
---|---|
version | 3.0.0-rc.2 |
usage | import {useSearchFieldState} from '@react-stately/searchfield' |
API#
useSearchFieldState(
(props: ValueBase<string>
)): SearchFieldState
Interface#
Name | Type | Description |
value | string | The current value of the search field. |
setValue | (
(val: string,
, ...args: any
)) => void | Sets the value of the search field. |
Example#
See the docs for useSearchField in react-aria for an example of useSearchField
.
Name | Type | Description |
value | string | The current value of the search field. |
setValue | (
(val: string,
, ...args: any
)) => void | Sets the value of the search field. |