Count
Count renders the number of search results.
Useful to display the total number of results after a search.
The component is not displayed while executing the search query or if there are no results.
Usage
<Count />
Props
label
FunctionoptionalAn optional function to wrap the component with a prefix and suffix string.
E.g.label={(cmp) => <> Found {cmp} results</>} />
overridableId
StringoptionalAn optional string to define a specific overridable id.
Usage when overriding
const MyCount = ({ totalResults }) => {
return <div>Found {totalResults} results.</div>;
}
const overriddenComponents = {
"Count.element": MyCount
};
Parameters
totalResults
NumberThe current value of the
totalresultsstate representing the number of results.