pagination count fix on change page size
This commit is contained in:
@@ -6,6 +6,7 @@ export const currentViewActionTypes = {
|
||||
SETREPRESENTATIONSUBMIT: "SETREPRESENTATIONSUBMIT",
|
||||
SETREPRESENTATIONSUBMITCONFIRMATION: "SETREPRESENTATIONSUBMITCONFIRMATION",
|
||||
SETCURRENTLINKEDCASES: "SETCURRENTLINKEDCASES",
|
||||
SETCURRENTPAGE: "SETCURRENTPAGE",
|
||||
};
|
||||
|
||||
export const getCurrentViewObj = () => (dispatch) => {
|
||||
@@ -64,3 +65,10 @@ export const setCurrentLinkedCases = (linkedCaseReferences) => (dispatch) => {
|
||||
linkedCaseReferences: linkedCaseReferences,
|
||||
});
|
||||
};
|
||||
|
||||
export const setCurrentPage = (currentPage) => (dispatch) => {
|
||||
return dispatch({
|
||||
type: currentViewActionTypes.SETCURRENTPAGE,
|
||||
currentPage: currentPage,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ const currentViewInitialState = {
|
||||
representationSubmit: null,
|
||||
representationSubmitConfirmation: {},
|
||||
linkedCaseReferences: {},
|
||||
currentPage: 1,
|
||||
};
|
||||
|
||||
export default function reducer(state = currentViewInitialState, action) {
|
||||
@@ -38,6 +39,11 @@ export default function reducer(state = currentViewInitialState, action) {
|
||||
representationSubmitConfirmation:
|
||||
action.representationSubmitConfirmation,
|
||||
};
|
||||
case currentViewActionTypes.SETCURRENTPAGE:
|
||||
return {
|
||||
...state,
|
||||
currentPage: action.currentPage,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user