Skip to content

Commit

Permalink
fix: extra query in Dashboard when native filter enabled (apache#14770)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored May 24, 2021
1 parent bb739ca commit 37eab94
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 37eab94

Please sign in to comment.