You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yo...@apache.org on 2021/05/22 01:50:30 UTC

[superset] 01/01: Revert "fix(dashboard): multiple query trigger when native filter enabled (#14734)"

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

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

commit 8b52033084d558265465145e98da0cb0c31506ad
Author: Yongjie Zhao <yo...@gmail.com>
AuthorDate: Sat May 22 09:48:58 2021 +0800

    Revert "fix(dashboard): multiple query trigger when native filter enabled (#14734)"
    
    This reverts commit 88de4109e718b7ebeb6b5c51ca14a2fad4299895.
---
 .../src/dashboard/components/nativeFilters/FilterBar/state.ts        | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts
index 73c01dd..8edf714 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts
@@ -107,7 +107,10 @@ export const useInitialization = () => {
     const numberOfLoadedCharts = Object.values(charts).filter(
       ({ chartStatus }) => chartStatus !== 'loading',
     ).length;
-    if (numberOfLoadedCharts >= numberOfLoadingCharts) {
+    if (
+      numberOfLoadingCharts > 0 &&
+      numberOfLoadedCharts >= numberOfLoadingCharts
+    ) {
       setIsInitialized(true);
     }
   }, [charts, isInitialized, numberOfLoadingCharts]);