Skip to main content

FacetValueSelector

FacetValueSelector

A component for selecting facet values.

Example

<FacetValueSelector onValueSelect={onValueSelectHandler} disabled={disabled} />
Signature
function FacetValueSelector(props: FacetValueSelectorProps): void

Parameters

props

FacetValueSelectorProps

A component for selecting facet values.

Signature
interface FacetValueSelectorProps {
onValueSelect: (value: FacetValue) => void;
disabled?: boolean;
placeholder?: string;
pageSize?: number;
}

onValueSelect

property
(value: FacetValue) => void

The function to call when a facet value is selected.

The value will have the following structure:

{
id: string;
name: string;
code: string;
facet: {
id: string;
name: string;
code: string;
};
}

disabled

property
boolean

Whether the selector is disabled.

placeholder

property
string

The placeholder text for the selector.

pageSize

property
number
default:
4

The number of facet values to display per page.