fix(dashboard): multiple query trigger when native filter enabled (#14734)

* fix(dashboard): multiple query trigger when native filter enabled

* fix lint

* wip
This commit is contained in:
Yongjie Zhao 2021-05-21 17:24:42 +01:00 committed by GitHub
parent 7c17b1a97f
commit 88de4109e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -107,10 +107,7 @@ export const useInitialization = () => {
const numberOfLoadedCharts = Object.values(charts).filter(
({ chartStatus }) => chartStatus !== 'loading',
).length;
if (
numberOfLoadingCharts > 0 &&
numberOfLoadedCharts >= numberOfLoadingCharts
) {
if (numberOfLoadedCharts >= numberOfLoadingCharts) {
setIsInitialized(true);
}
}, [charts, isInitialized, numberOfLoadingCharts]);