diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index 3d6f7eb161..50c16e9501 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx @@ -19,7 +19,7 @@ /* eslint-disable no-param-reassign */ import { HandlerFunction, styled, t } from '@superset-ui/core'; -import React, { useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { useDispatch } from 'react-redux'; import cx from 'classnames'; import Icon from 'src/components/Icon'; @@ -180,6 +180,10 @@ const FilterBar: React.FC = ({ [filterValues], ); + useEffect(() => { + setDataMaskSelected(() => dataMaskApplied); + }, [JSON.stringify(dataMaskApplied), setDataMaskSelected]); + const handleFilterSelectionChange = ( filter: Pick & Partial, dataMask: Partial,