diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index 6aef6e3069a7e..cb5e3e80a7ae1 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx @@ -289,6 +289,11 @@ const FilterBar: React.FC = ({ }, [JSON.stringify(filters), JSON.stringify(previousFilters)]); const dataMaskAppliedText = JSON.stringify(dataMaskApplied); + + useEffect(() => { + setDataMaskSelected(() => dataMaskApplied); + }, [dataMaskAppliedText, setDataMaskSelected]); + useEffect(() => { publishDataMask(history, dashboardId, updateKey, dataMaskApplied, tabId); // eslint-disable-next-line react-hooks/exhaustive-deps