From 302b5459d940aa1f3dc616b44e83f4951b4e5b5d Mon Sep 17 00:00:00 2001 From: KevinRohlf <123676073+KevinRohlf@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:22:54 +0100 Subject: [PATCH] fix: isSelected on top position --- src/@context/Filter.tsx | 3 ++- src/components/Search/Filter.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/@context/Filter.tsx b/src/@context/Filter.tsx index ad08083b..eb5ec629 100644 --- a/src/@context/Filter.tsx +++ b/src/@context/Filter.tsx @@ -35,7 +35,8 @@ function FilterProvider({ children }: { children: ReactNode }): ReactElement { accessType: [], serviceType: [], filterSet: [], - gaiax: [] + gaiax: [], + custom: [] }) const [ignorePurgatory, setIgnorePurgatory] = useState(true) const [sort, setSort] = useState({ diff --git a/src/components/Search/Filter.tsx b/src/components/Search/Filter.tsx index d360ac55..44df72d0 100644 --- a/src/components/Search/Filter.tsx +++ b/src/components/Search/Filter.tsx @@ -227,7 +227,7 @@ export default function Filter({
{filter.options.map((option) => { const isSelected = filters[filter.id].includes( - `${option.queryPath}=${option.value}` + `${filter.queryPath || option.queryPath}=${option.value}` ) return (