Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] fix for broken filter state, load crash #2069

Merged
merged 2 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/utils/src/filter-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ export function getFilterProps(
): Partial<Filter> & {fieldType: string} {
const filterProps = {
...fieldDomain,
fieldType: field.type
fieldType: field.type,
view: FILTER_VIEW_TYPES.side
};

switch (field.type) {
Expand Down
6 changes: 4 additions & 2 deletions test/fixtures/geojson.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ export const geoJsonTripFilterProps = {
type: 'range',
typeOptions: ['range'],
value: [4, 20],
gpu: true
gpu: true,
view: 'side'
};

export const mergedTripFilter = {
Expand Down Expand Up @@ -446,7 +447,8 @@ export const geoJsonRateFilterProps = {
fieldType: 'string',
type: 'multiSelect',
value: [],
gpu: false
gpu: false,
view: 'side'
};

export const mergedRateFilter = {
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/test-csv-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,8 @@ export const dateFilterProps = {
fieldType: 'date',
type: 'multiSelect',
gpu: false,
value: []
value: [],
view: 'side'
};

export const mergedDateFilter = {
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/test-hex-id-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ const mergedFields = [
value: [1, 76],
type: 'range',
typeOptions: ['range'],
gpu: true
gpu: true,
view: 'side'
}
}
];
Expand Down
7 changes: 5 additions & 2 deletions test/node/reducers/vis-state-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ test('#visStateReducer -> UPDATE_VIS_DATA -> mergeFilters', t => {
histogram: [1], // test not empty
enlargedHistogram: [2], // test not empty
fieldType: 'real',
view: FILTER_VIEW_TYPES.side,
type: mockFilter.type,
gpu: true,
typeOptions: ['range'],
Expand Down Expand Up @@ -2002,7 +2003,8 @@ test('#visStateReducer -> setFilter.dynamicDomain & cpu', t => {
value: [],
fieldType: 'date',
domain: ['2016-09-23', '2016-09-24', '2016-10-10'],
gpu: false
gpu: false,
view: FILTER_VIEW_TYPES.side
}
};

Expand Down Expand Up @@ -2558,7 +2560,8 @@ test('#visStateReducer -> setFilter.fixedDomain & DynamicDomain & gpu & cpu', t
fieldType: 'date',
type: 'multiSelect',
value: [],
gpu: false
gpu: false,
view: FILTER_VIEW_TYPES.side
}
}
: f
Expand Down