FacetValueSelector
FacetValueSelector
A component for selecting facet values.
Example
<FacetValueSelector onValueSelect={onValueSelectHandler} disabled={disabled} />
Signature
function FacetValueSelector(props: FacetValueSelectorProps): void
Parameters
props
parameter
FacetValueSelectorProps
A component for selecting facet values.
Signature
interface FacetValueSelectorProps {
onValueSelect: (value: FacetValue) => void;
disabled?: boolean;
placeholder?: string;
pageSize?: number;
}
onValueSelect
property
(value: FacetValue) => voidThe 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
booleanWhether the selector is disabled.
placeholder
property
stringThe placeholder text for the selector.
pageSize
property
numberdefault:
4The number of facet values to display per page.