fix(ui): sessions list pagination reset
This commit is contained in:
parent
383900ee37
commit
ef95bdeca5
2 changed files with 2 additions and 5 deletions
|
|
@ -58,6 +58,7 @@ interface Props extends RouteComponentProps {
|
|||
checkForLatestSessions: () => void;
|
||||
toggleFavorite: (sessionId: string) => Promise<void>;
|
||||
sites: object[];
|
||||
isLoggedIn: boolean;
|
||||
siteId: string;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,11 +71,7 @@ function reducer(state = initialState, action = {}) {
|
|||
case EDIT:
|
||||
return state.mergeIn(['instance'], action.instance).set('currentPage', 1);
|
||||
case APPLY:
|
||||
const _state = action.fromUrl ? state.set('instance', Filter(action.filter)) : state.mergeIn(['instance'], action.filter);
|
||||
if (action.resetPage) {
|
||||
_state.set('currentPage', 1)
|
||||
}
|
||||
return _state
|
||||
return action.fromUrl ? state.set('instance', Filter(action.filter)).set('currentPage', 1) : state.mergeIn(['instance'], action.filter).set('currentPage', 1);
|
||||
case success(FETCH):
|
||||
return state.set('instance', action.data);
|
||||
case success(FETCH_LIST):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue