This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 68e11cd fix(dashboard): filter set hydration not working (#14129)
68e11cd is described below
commit 68e11cd47f0319c5ef820f461b2da87a7e7b34a6
Author: Ville Brofeldt <[email protected]>
AuthorDate: Thu Apr 15 06:09:12 2021 +0300
fix(dashboard): filter set hydration not working (#14129)
---
superset-frontend/src/dashboard/actions/nativeFilters.ts | 15 +++++++++------
superset-frontend/src/dashboard/reducers/nativeFilters.ts | 1 +
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/superset-frontend/src/dashboard/actions/nativeFilters.ts
b/superset-frontend/src/dashboard/actions/nativeFilters.ts
index 2fc5541..7668184 100644
--- a/superset-frontend/src/dashboard/actions/nativeFilters.ts
+++ b/superset-frontend/src/dashboard/actions/nativeFilters.ts
@@ -19,10 +19,7 @@
import { makeApi } from '@superset-ui/core';
import { Dispatch } from 'redux';
-import {
- Filter,
- FilterConfiguration,
-} from 'src/dashboard/components/nativeFilters/types';
+import { FilterConfiguration } from
'src/dashboard/components/nativeFilters/types';
import { DataMaskType, DataMaskStateWithId } from 'src/dataMask/types';
import {
SET_DATA_MASK_FOR_FILTER_CONFIG_COMPLETE,
@@ -30,7 +27,12 @@ import {
} from 'src/dataMask/actions';
import { HYDRATE_DASHBOARD } from './hydrate';
import { dashboardInfoChanged } from './dashboardInfo';
-import { DashboardInfo, FilterSet } from '../reducers/types';
+import {
+ DashboardInfo,
+ Filters,
+ FilterSet,
+ FilterSets,
+} from '../reducers/types';
export const SET_FILTER_CONFIG_BEGIN = 'SET_FILTER_CONFIG_BEGIN';
export interface SetFilterConfigBegin {
@@ -111,7 +113,8 @@ export const setFilterConfiguration = (
type BootstrapData = {
nativeFilters: {
- filters: Filter;
+ filters: Filters;
+ filterSets: FilterSets;
filtersState: object;
};
};
diff --git a/superset-frontend/src/dashboard/reducers/nativeFilters.ts
b/superset-frontend/src/dashboard/reducers/nativeFilters.ts
index 8b8dc4f..f434d69 100644
--- a/superset-frontend/src/dashboard/reducers/nativeFilters.ts
+++ b/superset-frontend/src/dashboard/reducers/nativeFilters.ts
@@ -73,6 +73,7 @@ export default function nativeFilterReducer(
case HYDRATE_DASHBOARD:
return {
filters: action.data.nativeFilters.filters,
+ filterSets: action.data.nativeFilters.filterSets,
};
case SAVE_FILTER_SETS:
return {