Facet
A facet is a set of options used to filter a list of content items.
Props
Name | Type | Default | Description |
---|---|---|---|
facet required | IFacet | The attributes of this facet, see IFacet | |
facetRows required | IFacet[] | A list of IFacet representing all the possible values of this facet | |
clearFacet | (facet: string) => void | Callback function that runs when clicking on the unselect all rows button
| |
clearFacetLabel | string | Tooltip on the button to unselect all rows of this facet | |
enableExclusions | boolean | Wheter to display the exclusion or not | |
excludeTooltipMessage | (facetsRowName: string) => string | Function to format the tooltip on the exclusion button
| |
filterPlaceholder | string | The placerholder to display in the More values filter input | |
isOpened | boolean | Wheter the facet More dropdown is opened or not | |
key | Key | ||
maxRowsToShow | number | 5 | Maximum number for facet rows to show |
maxTooltipLabelLength | number | Display the label in a tooltip if the length is greater than this number | |
moreLabel | string | The label to display on the More values button | |
onClearFacet | (facet: string) => void | Callback function that runs when clicking on the unselect all button
| |
onDestroy | (facet: string) => void | Callback function that runs when this component unmounts
| |
onRender | (facet: string) => void | Callback function that runs when the component mounts
| |
onToggleFacet | (facet: string, facetRow: IFacet) => void | Callback function that runs when toggling a facet value
| |
ref | LegacyRef<Facet> | Allows getting a ref to the component instance.
Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). | |
selectedFacetRows | IFacet[] | A list of selected facets, see IFacet | |
toggleFacet | (facet: string, facetRow: IFacet) => void | Callback function that runs when selecting or unselecting a facet row
| |
withReduxState | boolean | true if using a connected component, false otherwise | Wheter this component is connected to the state or not |
Examples
Allow exclusion
Show more
No guidelines exist for Facet yet.