diff --git a/src/Store/Reducers/CVEsStore.js b/src/Store/Reducers/CVEsStore.js index 3815a0766..ddfd70e14 100644 --- a/src/Store/Reducers/CVEsStore.js +++ b/src/Store/Reducers/CVEsStore.js @@ -50,7 +50,7 @@ export const CVEsStore = (state = initialState, action) => { payload: action.payload, isLoading: false }, - prevLoadedRows: unionBy(state.prevLoadedRows, action.payload.data, 'id'), + prevLoadedRows: unionBy(action.payload.data, state.prevLoadedRows, 'id'), ...state.isAllExpanded && { expandedRows: action.payload.data.map(({ id }) => id) } }; diff --git a/src/Store/Reducers/InventoryEntitiesReducer.js b/src/Store/Reducers/InventoryEntitiesReducer.js index 13a832eb7..f8a82b26b 100644 --- a/src/Store/Reducers/InventoryEntitiesReducer.js +++ b/src/Store/Reducers/InventoryEntitiesReducer.js @@ -51,7 +51,7 @@ function modifyInventory(columns, state, action) { ...row, selected: state.selectedRows[row.id] === true })), - prevLoadedRows: unionBy(state.prevLoadedRows, action.payload.results, 'id') + prevLoadedRows: unionBy(action.payload.results, state.prevLoadedRows, 'id') }; }