From 608136dfee1aa26d107156e649566a4fc2f4b640 Mon Sep 17 00:00:00 2001 From: Stefan Moraru Date: Mon, 23 Dec 2024 12:11:36 +0200 Subject: [PATCH] fix(filters): flatten object filter values --- src/components/designSystem/Filters/utils.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/designSystem/Filters/utils.ts b/src/components/designSystem/Filters/utils.ts index cb0f4ca1f..85dfa2217 100644 --- a/src/components/designSystem/Filters/utils.ts +++ b/src/components/designSystem/Filters/utils.ts @@ -75,6 +75,13 @@ export const formatFiltersForCreditNotesQuery = (searchParams: URLSearchParams) const value = FILTER_VALUE_MAP[key]?.(current[1]) || current[1] + if (typeof value === 'object') { + return { + ...acc, + ...value, + } + } + return { ...acc, [key]: value,