Skip to content

Commit

Permalink
Eliminating console errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
arivepr committed Sep 6, 2023
1 parent 351ba96 commit e9d3834
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/NotificationsDrawer/DrawerPanelContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import { PopoverPosition } from '@patternfly/react-core/dist/dynamic/components/Popover';
import { Icon } from '@patternfly/react-core/dist/dynamic/components/Icon';
import { Badge } from '@patternfly/react-core/dist/dynamic/components/Badge';
import { Checkbox } from '@patternfly/react-core/dist/dynamic/components/Checkbox';
import { Flex, FlexItem } from '@patternfly/react-core/dist/dynamic/layouts/Flex';
import { Dropdown, DropdownGroup, DropdownItem, DropdownList } from '@patternfly/react-core/dist/dynamic/components/Dropdown';
import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/dynamic/components/MenuToggle';
Expand Down Expand Up @@ -148,16 +147,19 @@ const DrawerPanelBase = ({ innerRef }: DrawerPanelProps) => {
<DropdownGroup key="filter-label" label="Show notifications for...">
<DropdownList>
{filterConfig.map((source) => (
<DropdownItem key={source.value} onClick={() => onFilterSelect(source.value)} isDisabled={notifications.length === 0}>
<Checkbox isChecked={activeFilters.includes(source.value)} id={source.value} className="pf-v5-u-mr-sm" />
<DropdownItem
key={source.value}
onClick={() => onFilterSelect(source.value)}
isDisabled={notifications.length === 0}
isSelected={activeFilters.includes(source.value)}
hasCheckbox
>
{source.title}
</DropdownItem>
))}
<Divider />
<DropdownItem key="reset-filters" onClick={() => setActiveFilters([])}>
<Button variant="link" isDisabled={activeFilters.length === 0} isInline>
Reset filters
</Button>
<DropdownItem key="reset-filters" isDisabled={activeFilters.length === 0} onClick={() => setActiveFilters([])}>
Reset filters
</DropdownItem>
</DropdownList>
</DropdownGroup>,
Expand Down

0 comments on commit e9d3834

Please sign in to comment.