Skip to content

Commit

Permalink
πŸ› Fix filter issue #2751 (#2752)
Browse files Browse the repository at this point in the history
* πŸ› Fix filter issue #2751

* πŸ› Fix filter when empty query #2751
  • Loading branch information
padms authored Jan 16, 2025
1 parent 39f1164 commit 5e3cd1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/templates/newsroom/Newsroom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const NewsRoomTemplate = forwardRef<HTMLElement, NewsRoomTemplateProps>(function
const queriedSearchClient: SearchClient = {
...searchClient,
search(requests: any) {
if (requests.every(({ params }: any) => !params.query)) {
if (requests.every(({ params }: any) => !params.query && params?.facetFilters?.flat().length > 2)) {
return Promise.resolve({
results: requests.map(() => initialSearchResponse),
})
Expand Down

0 comments on commit 5e3cd1c

Please sign in to comment.