From 41ace7a04e9e69eba6e217f4ff81291a7f7515f4 Mon Sep 17 00:00:00 2001 From: John Russel Fontillas Date: Mon, 18 Nov 2024 10:32:08 +0800 Subject: [PATCH] Filter Resets to Default Options After Dropdown Selection, Notifications Not Displayed on Update --- .../molecules/NotificationFilterDropdown/index.tsx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/client/src/components/molecules/NotificationFilterDropdown/index.tsx b/client/src/components/molecules/NotificationFilterDropdown/index.tsx index 61047b36..7fd549a0 100644 --- a/client/src/components/molecules/NotificationFilterDropdown/index.tsx +++ b/client/src/components/molecules/NotificationFilterDropdown/index.tsx @@ -97,11 +97,7 @@ const NotificationFilterDropdown: FC = (props): JSX.Element => { focus:border-primary focus:ring-1 focus:ring-primary `} id="filterStatus" - defaultValue={ - router.query.status !== undefined - ? router.query.status - : STATUS_OPTIONS.ALL.toLowerCase() - } + value={filters.status} onChange={(e) => handleStatusChange(e)} > {filterStatusOptions(statusOptions)} @@ -115,11 +111,7 @@ const NotificationFilterDropdown: FC = (props): JSX.Element => { focus:border-primary focus:ring-1 focus:ring-primary `} id="filterType" - defaultValue={ - router.query.type !== undefined - ? router.query.type - : TYPE_OPTIONS.ALL.toLowerCase() - } + value={filters.type} onChange={(e) => handleTypeChange(e)} > {filterTypeOptions(typeOptions)}