API Reference
Provides context to Filter
<FilterProvider> <FilterTrigger>...</FilterTrigger> <FilterPopover>...</FilterPopover> </FilterProvider>
Parameters
props
- Type:
@vtex/shoreline-components.FilterProviderProps
Props
children
Children of FilterProvider
- Type:
@types/react.React.ReactNode
defaultOpen
(optional)
Whether the filter is open by default
- Type:
boolean
defaultSearchValue
(optional)
Whether the filter is searchable by default
- Type:
string
defaultValue
(optional)
Filter default value
- Type:
string | string[]
open
(optional)
Whether the filter is open
- Type:
boolean
searchValue
(optional)
Whether the filter is searchable
- Type:
string
setOpen
(optional)
Callback to set the filter open state
- Type:
@types/react.React.Dispatch<@types/react.React.SetStateAction<boolean>>
setSearchValue
(optional)
Callback to set the filter search value
- Type:
@types/react.React.Dispatch<@types/react.React.SetStateAction<string>>
setValue
(optional)
Callback to set the filter value
- Type:
@types/react.React.Dispatch<@types/react.React.SetStateAction<string>> | @types/react.React.Dispatch<@types/react.React.SetStateAction<string[]>>
value
(optional)
Filter value
- Type:
string | string[]