Skip to content

Commit bb6a376

Browse files
authored
[fix] adjust time range filter on value set (#2823)
- additional type updates for filter types where we get rid of BaseFilter properties that we override in all the filter types Signed-off-by: Ihor Dykhta <[email protected]>
1 parent cef3faf commit bb6a376

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/reducers/src/vis-state-updaters.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,7 @@ export function setFilterAnimationTimeUpdater(
966966
state: VisState,
967967
action: VisStateActions.SetFilterAnimationTimeUpdaterAction
968968
): VisState {
969-
const newState = setFilterUpdater(state, action);
970-
return adjustAnimationConfigWithFilter(newState, action.idx);
969+
return setFilterUpdater(state, action);
971970
}
972971

973972
/**
@@ -1078,6 +1077,11 @@ export function setFilterUpdater<S extends VisState>(
10781077
// pass only the dataset we need to update
10791078
newState = updateAllLayerDomainData(newState, datasetIdsToFilter, newFilter);
10801079

1080+
// If time range filter value was updated, adjust animation config
1081+
if (newFilter.type === FILTER_TYPES.timeRange && props.includes('value')) {
1082+
newState = adjustAnimationConfigWithFilter(newState, action.idx);
1083+
}
1084+
10811085
return newState;
10821086
}
10831087

0 commit comments

Comments
 (0)