You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2023/03/28 14:55:18 UTC

[superset] branch fix/dashboard-filter-first-value created (now e6feadf828)

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

diegopucci pushed a change to branch fix/dashboard-filter-first-value
in repository https://gitbox.apache.org/repos/asf/superset.git


      at e6feadf828 Remove redundant useEffect

This branch includes the following new commits:

     new e6feadf828 Remove redundant useEffect

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[superset] 01/01: Remove redundant useEffect

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

diegopucci pushed a commit to branch fix/dashboard-filter-first-value
in repository https://gitbox.apache.org/repos/asf/superset.git

commit e6feadf8289d54e2523ea40fce797778d5ee74c2
Author: geido <di...@gmail.com>
AuthorDate: Tue Mar 28 16:54:55 2023 +0200

    Remove redundant useEffect
---
 .../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 d3cb2b4dea..a04606212c 100644
--- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
@@ -129,7 +129,6 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) {
         enableEmptyFilter && !inverseSelection && !values?.length;
 
       const suffix = inverseSelection && values?.length ? t(' (excluded)') : '';
-
       dispatchDataMask({
         type: 'filterState',
         __cache: filterState,
@@ -290,13 +289,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)]);