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

This reverts commit 88de4109e7.
This commit is contained in:
Yongjie Zhao 2021-05-22 08:11:58 +01:00 committed by GitHub
parent c7aee4e27b
commit d71b8b38d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]);