From 7bd97cf0cb451754367442f388fb1fa752ebfdb2 Mon Sep 17 00:00:00 2001 From: akshaykumar2505 Date: Sun, 19 Apr 2026 19:36:04 +0530 Subject: [PATCH] feat: add boolean filter support and improve filter key generation - Introduced a new boolean filter input type in PlaygroundFilterInput with options for true/false selection. - Updated default filter values to include boolean type with an initial operator and value. - Enhanced filter operator handling in useDataSourcesMeta to accommodate boolean operators. - Improved key generation for FilterInput components to ensure unique keys based on member properties. --- .../PlaygroundFilterGroup/index.tsx | 4 ++-- .../PlaygroundFilterInput/index.tsx | 13 ++++++++++++ src/hooks/useAnalyticsQuery.ts | 12 ++++++++--- src/hooks/useDataSourcesMeta.ts | 20 ++++++++++++++++--- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/components/PlaygroundFilterGroup/index.tsx b/src/components/PlaygroundFilterGroup/index.tsx index b5e25866..b988688b 100644 --- a/src/components/PlaygroundFilterGroup/index.tsx +++ b/src/components/PlaygroundFilterGroup/index.tsx @@ -32,7 +32,7 @@ const FilterGroup: FC = ({ { trackEvent("Update Member", { memberName: addMemberName }); if (dimension) updateMethods.update(m, { ...m, dimension }); @@ -54,7 +54,7 @@ const FilterGroup: FC = ({ diff --git a/src/components/PlaygroundFilterInput/index.tsx b/src/components/PlaygroundFilterInput/index.tsx index e2ae061d..751897ca 100644 --- a/src/components/PlaygroundFilterInput/index.tsx +++ b/src/components/PlaygroundFilterInput/index.tsx @@ -58,6 +58,19 @@ const filterInputs = { value={(values && values[0]) || ""} /> ), + boolean: ({ values, onChange }: PlaygroundFilterInputProps) => ( +