Skip to content

Commit

Permalink
Merge pull request #342 from framgia/bugtask/hris-443
Browse files Browse the repository at this point in the history
[HRIS - 443] - [BUGTASK] Filter Resets to Default Options After Dropdown Selection, Notifications Not Displayed on Update
  • Loading branch information
jessrey-asterisk authored Nov 19, 2024
2 parents 63bae9a + 0b068a1 commit e174a11
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import classNames from 'classnames'
import { useRouter } from 'next/router'
import { Menu } from '@headlessui/react'
import React, { FC, ReactNode } from 'react'

Expand All @@ -18,8 +17,6 @@ type Props = {
}

const NotificationFilterDropdown: FC<Props> = (props): JSX.Element => {
const router = useRouter()

const {
children,
className = 'shrink-0 outline-none active:scale-95',
Expand Down Expand Up @@ -97,11 +94,7 @@ const NotificationFilterDropdown: FC<Props> = (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)}
Expand All @@ -115,11 +108,7 @@ const NotificationFilterDropdown: FC<Props> = (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)}
Expand Down

0 comments on commit e174a11

Please sign in to comment.