From 41ace7a04e9e69eba6e217f4ff81291a7f7515f4 Mon Sep 17 00:00:00 2001 From: John Russel Fontillas Date: Mon, 18 Nov 2024 10:32:08 +0800 Subject: [PATCH 1/3] 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)} From 55850faf5809ccb268f67b63bab76f505ef75a5c Mon Sep 17 00:00:00 2001 From: John Russel Fontillas Date: Mon, 18 Nov 2024 10:45:34 +0800 Subject: [PATCH 2/3] Resolved the Build frontend Github --- .../components/molecules/NotificationFilterDropdown/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/src/components/molecules/NotificationFilterDropdown/index.tsx b/client/src/components/molecules/NotificationFilterDropdown/index.tsx index 7fd549a0..9bc4ad8b 100644 --- a/client/src/components/molecules/NotificationFilterDropdown/index.tsx +++ b/client/src/components/molecules/NotificationFilterDropdown/index.tsx @@ -1,5 +1,4 @@ import classNames from 'classnames' -import { useRouter } from 'next/router' import { Menu } from '@headlessui/react' import React, { FC, ReactNode } from 'react' @@ -18,7 +17,6 @@ type Props = { } const NotificationFilterDropdown: FC = (props): JSX.Element => { - const router = useRouter() const { children, From 0b068a1e3d2fbda75a7783527e9654fc2283965b Mon Sep 17 00:00:00 2001 From: John Russel Fontillas Date: Mon, 18 Nov 2024 10:51:12 +0800 Subject: [PATCH 3/3] Resolved the Build frontend Github v2 --- .../components/molecules/NotificationFilterDropdown/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/components/molecules/NotificationFilterDropdown/index.tsx b/client/src/components/molecules/NotificationFilterDropdown/index.tsx index 9bc4ad8b..44a9d8ac 100644 --- a/client/src/components/molecules/NotificationFilterDropdown/index.tsx +++ b/client/src/components/molecules/NotificationFilterDropdown/index.tsx @@ -17,7 +17,6 @@ type Props = { } const NotificationFilterDropdown: FC = (props): JSX.Element => { - const { children, className = 'shrink-0 outline-none active:scale-95',