From c61e90a60186c87740ce1dc13834494211d2e5a3 Mon Sep 17 00:00:00 2001 From: simcha90 <56388545+simcha90@users.noreply.github.com> Date: Tue, 25 May 2021 11:25:13 +0300 Subject: [PATCH] fix(native-filters): Manage default value of filters by superset (#14785) * fix:fix get permission function * feat: manage default value in superset --- .../dashboard/components/nativeFilters/FilterBar/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx index 3d6f7eb161ae4..50c16e95018f5 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,