From cd81d841dfab003b6141c7d74f2296aa4528d753 Mon Sep 17 00:00:00 2001 From: acouch Date: Mon, 1 Jul 2024 11:08:19 -0400 Subject: [PATCH] Add search filters without separate component --- .../SearchFilterAccordion.tsx | 9 ++++----- frontend/src/app/[locale]/look/page.tsx | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/[locale]/look/SearchFilterAccordion/SearchFilterAccordion.tsx b/frontend/src/app/[locale]/look/SearchFilterAccordion/SearchFilterAccordion.tsx index 726f7d249b..9d100b2751 100644 --- a/frontend/src/app/[locale]/look/SearchFilterAccordion/SearchFilterAccordion.tsx +++ b/frontend/src/app/[locale]/look/SearchFilterAccordion/SearchFilterAccordion.tsx @@ -86,16 +86,15 @@ export function SearchFilterAccordion({ updateQueryParams(updated, key, queryTerm); } - const isAllSelected = false; - const isNoneSelected = true; + const isExpanded = query.size ? true: false; const getAccordionContent = () => ( <> toggleSelectAll(true, allSelected)} onClearAll={() => toggleSelectAll(false, allSelected)} - isAllSelected={isAllSelected} - isNoneSelected={isNoneSelected} + isAllSelected={isSectionAllSelected(allSelected, query)} + isNoneSelected={isSectionNoneSelected(query)} />