Skip to content

Filter option (async)

This component provides an option select functionality, allowing users to select a single option from a set of options fetched remotely. It handles state updates automatically.

WARNING

This component can only be used within a Filter.

Props

fetch-options: (ids: FluxFilterValue[]) => Promise<FluxFilterOptionRow[]>
A function that returns the option objects based on the selected value.

fetch-relevant: () => Promise<FluxFilterOptionRow[]>
A function that returns the relevant options.

fetch-search: (searchQuery: string) => Promise<FluxFilterOptionRow[]>
A function that returns the options based on the search query.

icon?: FluxIconName
The icon of the filter.

label: string
The label of the filter.

name: string
The name of the filter within the filter state.

search-placeholder?: boolean
The placeholder to show in the search bar.

Used components