mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
refactor(native-filters): update dataMask and ExtraFormData schema (#13983)
* refactor: updates usage of `ownFilters` to `ownState` * refactor: update dataMask (final) * lint: fix lint * refactor: revert feat * fix: fix missed chart configuration * add filter set migration * apply new changes * fix migration revision * update migration * fix jest mock * js lint * fix test types * update tests and types * remove append_form_data from tests * fix findExistingFilterSet tests * add migration test Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
This commit is contained in:
@@ -16,18 +16,15 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { DataMaskStateWithId, DataMaskType } from 'src/dataMask/types';
|
||||
import { DataMaskStateWithId } from 'src/dataMask/types';
|
||||
import { NativeFiltersState } from 'src/dashboard/reducers/types';
|
||||
|
||||
export const mockDataMaskInfo: DataMaskStateWithId = {
|
||||
[DataMaskType.CrossFilters]: {},
|
||||
[DataMaskType.OwnFilters]: {},
|
||||
[DataMaskType.NativeFilters]: {
|
||||
DefaultsID: {
|
||||
id: 'DefaultId',
|
||||
currentState: {
|
||||
value: [],
|
||||
},
|
||||
DefaultsID: {
|
||||
id: 'DefaultId',
|
||||
ownState: {},
|
||||
filterState: {
|
||||
value: [],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -64,14 +64,11 @@ describe('getFormDataWithExtraFilters', () => {
|
||||
},
|
||||
},
|
||||
dataMask: {
|
||||
crossFilters: {},
|
||||
ownFilters: {},
|
||||
nativeFilters: {
|
||||
[filterId]: {
|
||||
id: filterId,
|
||||
extraFormData: {},
|
||||
currentState: {},
|
||||
},
|
||||
[filterId]: {
|
||||
id: filterId,
|
||||
extraFormData: {},
|
||||
filterState: {},
|
||||
ownState: {},
|
||||
},
|
||||
},
|
||||
layout: (dashboardLayout.present as unknown) as {
|
||||
|
||||
Reference in New Issue
Block a user