Merge pull request #1078 from openreplay/dev

fix(ui) - filter state update
This commit is contained in:
Mehdi Osman 2023-03-30 20:06:52 +02:00 committed by GitHub
commit 45bf16d260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,11 +71,11 @@ function reducer(state = initialState, action = {}) {
case EDIT:
return state.mergeIn(['instance'], action.instance).set('currentPage', 1);
case APPLY:
state.mergeIn(['instance'], action.filter).set('currentPage', 1);
const _state = action.fromUrl ? state.set('instance', Filter(action.filter)) : state.mergeIn(['instance'], action.filter);
if (action.resetPage) {
state.set('currentPage', 1)
_state.set('currentPage', 1)
}
return state
return _state
case success(FETCH):
return state.set('instance', action.data);
case success(FETCH_LIST):