I have successfully implemented the Sitecore search widget and the result list is working as expected.
However, I encountered an issue with the filter functionality using facets. By default, it supports multiple filters but my requirement is to have single select (only one facet selected at a time).
I have tried different approaches but I'm unsure how to achieve this functionality.
When I attempt to select a new facet, it just adds the new selected facet ID to the existing array instead of replacing it.
If someone could provide guidance on how to achieve single select functionality for facets in Sitecore search, it would be greatly appreciated.
<button onClick={() => { onFacetClick({ facetValueId: selectedArticleTypeValue?.id, facetIndex: 0, facetId: 'article_type', type: 'valueId', checked: false, }); > {jobFacet?.text} </button>