Toggle
Toggle
renders a Toggle Checkbox in a Card element providing a filter for the performed search.
Usage
<Toggle
title="Versions"
label="View all versions"
filterValue={['all_versions', 'true']}
/>
Props
title
String
optionalThe optional title for the Card element.
label
label
optionalAn optional label to for the Checkbox element.
filterValue
Array
An array containing the filter to be applied to the search query when active.
overridableId
String
optionalAn optional string to define a specific overridable id.
Usage when overriding
const MyCount = ({ totalResults }) => {
return <div>Found {totalResults} results.</div>;
}
const overriddenComponents = {
"SearchFilters.ToggleComponent.element": MyCount
};
Parameters
title
String
optionalThe optional title for the Card element.
label
label
optionalAn optional label to for the Checkbox element.
filterValue
Array
An array containing the filter to be applied to the search query when active.
userSelectionFilters
Array
The list of currently selected filters by the user.
updateQueryFilters
Function
The function to call to add or remove a filter from the list of selected ones
updateQueryFilters(filter)
.