No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

useSearchResultsIsSelectedFacet

The useSearchResultsIsSelectedFacet is a helper hook used in complement of useSearchResults who returns if a facet has been selected in a Search Result Widget.

Return Value

boolean

Importing

import { useSearchResultsIsSelectedFacet } from '@sitecore-search/react';

Parameters

useSearchResultsIsSelectedFacet(facetType, facetId);
NameDescriptionType
facetTypeThe id of the facet typestring
facetIdThe id of the facet value itemstring