Skip to content

Commit

Permalink
fix(native-filters): Default value not shown in native filters (#18963)
Browse files Browse the repository at this point in the history
* fix(native-filters): Default value not shown in native filters

* Reuse stringified datamask

(cherry picked from commit 2072225)
  • Loading branch information
kgabryje authored and villebro committed Apr 3, 2022
1 parent 1f4ff51 commit f7b72d9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ const FilterBar: React.FC<FiltersBarProps> = ({
}, [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
Expand Down

0 comments on commit f7b72d9

Please sign in to comment.