docs: fix tag filters in search (#8862)

This commit is contained in:
Shahed Nasser
2024-08-29 20:05:58 +03:00
committed by GitHub
parent bb8878f4ef
commit fbd93ab67c
4 changed files with 103 additions and 102 deletions

View File

@@ -8,8 +8,8 @@ import { SearchSuggestions, type SearchSuggestionType } from "./Suggestions"
import { AlgoliaProps, useSearch } from "@/providers"
import { checkArraySameElms } from "@/utils"
import { SearchHitsWrapper } from "./Hits"
import { Button, Kbd, SelectBadge, SpinnerLoading } from "@/components"
import { MagnifyingGlass, XMark } from "@medusajs/icons"
import { Button, SelectBadge, SpinnerLoading } from "@/components"
import { XMark } from "@medusajs/icons"
import { useSearchNavigation, type OptionType } from "@/hooks"
import { SearchFooter } from "./Footer"
@@ -150,7 +150,10 @@ export const Search = ({
>
<SearchHitsWrapper
configureProps={{
tagRefinements: filters,
// filters array has to be wrapped
// in another array for an OR condition
// to be applied between the items.
tagFilters: [filters],
}}
indices={algolia.indices}
checkInternalPattern={checkInternalPattern}