You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/02/13 19:02:06 UTC

[superset] branch master updated: fix(native-filters): set currentValue null when empty (#13000)

This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bc4c837  fix(native-filters): set currentValue null when empty (#13000)
bc4c837 is described below

commit bc4c837da324d2ca95c320e5996481e1649219ad
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Sat Feb 13 21:01:12 2021 +0200

    fix(native-filters): set currentValue null when empty (#13000)
---
 .../src/dashboard/components/nativeFilters/FilterBar/CascadePopover.tsx | 2 +-
 superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CascadePopover.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CascadePopover.tsx
index b5a9432..0a51df0 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CascadePopover.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/CascadePopover.tsx
@@ -108,7 +108,7 @@ const CascadePopover: React.FC<CascadePopoverProps> = ({
         return activeChildren;
       }
 
-      if (currentValue) {
+      if (currentValue !== undefined && currentValue !== null) {
         return [filter];
       }
 
diff --git a/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx b/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx
index 85f567a..01d6f2d 100644
--- a/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx
+++ b/superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx
@@ -74,7 +74,7 @@ export default function AntdPluginFilterSelect(
         inverseSelection,
       ),
       currentState: {
-        value: resultValue,
+        value: resultValue.length ? resultValue : null,
       },
     });
   };