Skip to content

Commit

Permalink
Address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Mar 9, 2022
1 parent 339b537 commit f9ea592
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,25 @@ import {
isFeatureEnabled,
} from '@superset-ui/core';
import { ParentSize } from '@vx/responsive';
import pick from 'lodash/pick';
import Tabs from 'src/components/Tabs';
import DashboardGrid from 'src/dashboard/containers/DashboardGrid';
import getLeafComponentIdFromPath from 'src/dashboard/util/getLeafComponentIdFromPath';
import {
ChartsState,
DashboardLayout,
LayoutItem,
RootState,
} from 'src/dashboard/types';
import getLeafComponentIdFromPath from 'src/dashboard/util/getLeafComponentIdFromPath';
import {
DASHBOARD_GRID_ID,
DASHBOARD_ROOT_DEPTH,
} from 'src/dashboard/util/constants';
import { getChartIdsInFilterScope } from 'src/dashboard/util/getChartIdsInFilterScope';
import findTabIndexByComponentId from 'src/dashboard/util/findTabIndexByComponentId';
import { setInScopeStatusOfFilters } from 'src/dashboard/actions/nativeFilters';
import { getRootLevelTabIndex, getRootLevelTabsComponent } from './utils';
import { getChartIdsInFilterScope } from '../../util/getChartIdsInFilterScope';
import findTabIndexByComponentId from '../../util/findTabIndexByComponentId';
import { findTabsWithChartsInScope } from '../nativeFilters/utils';
import { setInScopeStatusOfFilters } from '../../actions/nativeFilters';
import { NATIVE_FILTER_DIVIDER_PREFIX } from '../nativeFilters/FiltersConfigModal/utils';

type DashboardContainerProps = {
Expand All @@ -58,11 +59,9 @@ const useNativeFilterScopes = () => {
return useMemo(
() =>
nativeFilters
? Object.values(nativeFilters).map((filter: Filter) => ({
id: filter.id,
scope: filter.scope,
type: filter.type,
}))
? Object.values(nativeFilters).map((filter: Filter) =>
pick(filter, ['id', 'scope', 'type']),
)
: [],
[JSON.stringify(nativeFilters)],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import {
} from '@superset-ui/core';
import { NO_TIME_RANGE, TIME_FILTER_MAP } from 'src/explore/constants';
import { getChartIdsInFilterBoxScope } from 'src/dashboard/util/activeDashboardFilters';
import { CHART_TYPE } from 'src/dashboard/util/componentTypes';
import { ChartConfiguration } from 'src/dashboard/reducers/types';
import { Layout } from 'src/dashboard/types';
import { areObjectsEqual } from 'src/reduxUtils';
import { Layout } from '../../types';
import { CHART_TYPE } from '../../util/componentTypes';

export enum IndicatorStatus {
Unset = 'UNSET',
Expand Down

0 comments on commit f9ea592

Please sign in to comment.