From 89b24ffa0167b5beb57a48ce1a28c56883250c86 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Thu, 30 Mar 2023 20:01:27 +0200 Subject: [PATCH] fix(ui) - filte state update --- frontend/app/duck/search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/duck/search.js b/frontend/app/duck/search.js index 1f68d1994..54b3f0132 100644 --- a/frontend/app/duck/search.js +++ b/frontend/app/duck/search.js @@ -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):