Skip to content

Commit

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

* fix(native-filters): Default value not shown in native filters

* Reuse stringified datamask

(cherry picked from commit 2072225)
  • Loading branch information
kgabryje authored and sadpandajoe committed Mar 2, 2022
1 parent e6fc525 commit 11baa03
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 11baa03

Please sign in to comment.