From 7bae9463b25201954f1e57afc43161b51bab1b73 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 8 Nov 2024 08:49:05 -0600 Subject: [PATCH] Small general filter bugfix (#14870) --- web/src/components/filter/ReviewFilterGroup.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index bea816203..d31596561 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -214,7 +214,9 @@ export default function ReviewFilterGroup({ showAll={filter?.showAll == true} allZones={filterValues.zones} selectedZones={filter?.zones} - onUpdateFilter={onUpdateFilter} + onUpdateFilter={(general) => { + onUpdateFilter({ ...filter, ...general }); + }} /> )} {isMobile && mobileSettingsFeatures.length > 0 && ( @@ -293,7 +295,7 @@ type GeneralFilterButtonProps = { allZones: string[]; selectedZones?: string[]; filter?: GeneralFilter; - onUpdateFilter: (filter: ReviewFilter) => void; + onUpdateFilter: (filter: GeneralFilter) => void; }; function GeneralFilterButton({ @@ -370,7 +372,11 @@ function GeneralFilterButton({ setOpen(false); }} onReset={() => { - const resetFilter: GeneralFilter = {}; + const resetFilter: GeneralFilter = { + labels: undefined, + zones: undefined, + showAll: false, + }; setCurrentFilter(resetFilter); onUpdateFilter(resetFilter); }}