Skip to content

Commit

Permalink
Merge pull request #2721 from Hyperkid123/enable-global-filter
Browse files Browse the repository at this point in the history
Use active module for global filder disabled flag.
  • Loading branch information
Hyperkid123 authored Dec 7, 2023
2 parents 7b15489 + 403f42a commit d8e21e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/GlobalFilter/GlobalFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import { FlagTagsFilter } from '../../@types/types';
import { isGlobalFilterAllowed } from '../../utils/common';
import InternalChromeContext from '../../utils/internalChromeContext';
import ChromeAuthContext from '../../auth/ChromeAuthContext';
import { useAtomValue } from 'jotai';
import { activeModuleAtom } from '../../state/atoms';

const useLoadTags = (hasAccess = false) => {
const navigate = useNavigate();
Expand Down Expand Up @@ -63,7 +65,9 @@ const GlobalFilter = ({ hasAccess }: { hasAccess: boolean }) => {
}),
shallowEqual
);
const isDisabled = useSelector(({ globalFilter: { globalFilterHidden }, chrome: { appId } }: ReduxState) => globalFilterHidden || !appId);
const globalFilterHidden = useSelector(({ globalFilter: { globalFilterHidden } }: ReduxState) => globalFilterHidden);
const activeModule = useAtomValue(activeModuleAtom);
const isDisabled = globalFilterHidden || !activeModule;

const { filter, chips, selectedTags, setValue, filterTagsBy } = (
useTagsFilter as unknown as (
Expand Down

0 comments on commit d8e21e7

Please sign in to comment.