You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2023/08/18 00:02:27 UTC

[superset] 01/06: fix: Dashboard not loading with default first value in filter (#23512)

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

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

commit 4be3fa218f68ea96b41236977695f71fa5bbc2d2
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Wed Mar 29 18:18:08 2023 +0200

    fix: Dashboard not loading with default first value in filter (#23512)
---
 .../src/filters/components/Select/SelectFilterPlugin.tsx           | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
index 7de9efcfaf..50f87b655d 100644
--- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
@@ -128,7 +128,6 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
         enableEmptyFilter && !inverseSelection && !values?.length;
 
       const suffix = inverseSelection && values?.length ? t(' (excluded)') : '';
-
       dispatchDataMask({
         type: 'filterState',
         __cache: filterState,
@@ -289,13 +288,9 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
     updateDataMask,
     data,
     groupby,
-    JSON.stringify(filterState),
+    JSON.stringify(filterState.value),
   ]);
 
-  useEffect(() => {
-    updateDataMask(filterState.value);
-  }, [JSON.stringify(filterState.value)]);
-
   useEffect(() => {
     setDataMask(dataMask);
   }, [JSON.stringify(dataMask)]);