Skip to content

Commit

Permalink
fix(native-filters): Manage default value of filters by superset (apa…
Browse files Browse the repository at this point in the history
…che#14785)

* fix:fix get permission function

* feat: manage default value in superset
  • Loading branch information
simcha90 authored May 25, 2021
1 parent 9b8a620 commit fe12abf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -180,6 +180,10 @@ const FilterBar: React.FC<FiltersBarProps> = ({
[filterValues],
);

useEffect(() => {
setDataMaskSelected(() => dataMaskApplied);
}, [JSON.stringify(dataMaskApplied), setDataMaskSelected]);

const handleFilterSelectionChange = (
filter: Pick<Filter, 'id'> & Partial<Filter>,
dataMask: Partial<DataMaskState>,
Expand Down

0 comments on commit fe12abf

Please sign in to comment.