Skip to content

Commit

Permalink
Merge pull request #43 from CX-Box/fix/CXBOX-190
Browse files Browse the repository at this point in the history
CXBOX-190 | fixed page change for showViewPopup
  • Loading branch information
romadim committed Dec 4, 2023
2 parents 621199b + 85fa591 commit 19aac7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reducers/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ export function screen(state = initialState, action: AnyAction, store: Store): S
}
}
case types.showViewPopup: {
const currentPage = state.bo.bc[action.payload.bcName]?.page ?? 1

return {
...state,
bo: {
Expand All @@ -420,7 +422,7 @@ export function screen(state = initialState, action: AnyAction, store: Store): S
...state.bo.bc,
[action.payload.bcName]: {
...state.bo.bc[action.payload.bcName],
page: 1,
page: action.payload.bcName === action.payload.calleeBCName ? currentPage : 1,
loading: action.payload.bcName !== action.payload.calleeBCName
}
}
Expand Down

0 comments on commit 19aac7c

Please sign in to comment.