This is an automated email from the ASF dual-hosted git repository.
yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 8484ee6 fix: extra query in Dashboard when native filter enabled
(#14770)
8484ee6 is described below
commit 8484ee653f7e8d1784dfbb208ac8f49cb2cbad2f
Author: Yongjie Zhao <[email protected]>
AuthorDate: Mon May 24 13:53:14 2021 +0100
fix: extra query in Dashboard when native filter enabled (#14770)
---
.../src/dashboard/components/nativeFilters/FilterBar/index.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index 534866b..3d6f7eb 100644
---
a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++
b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -187,8 +187,11 @@ const FilterBar: React.FC<FiltersBarProps> = ({
setIsFilterSetChanged(tab !== TabIds.AllFilters);
setDataMaskSelected(draft => {
const children = cascadeChildren[filter.id] || [];
- // force instant updating on initialization or for parent filters
- if (filter.isInstant || children.length > 0) {
+ // force instant updating on initialization or for parent filters when
dataMaskSelected has filter
+ if (
+ dataMaskSelected[filter.id] &&
+ (filter.isInstant || children.length > 0)
+ ) {
dispatch(updateDataMask(filter.id, dataMask));
}