Skip to content

Commit c99c502

Browse files
authored
fix: Correctly refresh previously loaded rows (RedHatInsights#1188)
VULN-1903
1 parent a333bc9 commit c99c502

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Store/Reducers/CVEsStore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const CVEsStore = (state = initialState, action) => {
5050
payload: action.payload,
5151
isLoading: false
5252
},
53-
prevLoadedRows: unionBy(state.prevLoadedRows, action.payload.data, 'id'),
53+
prevLoadedRows: unionBy(action.payload.data, state.prevLoadedRows, 'id'),
5454
...state.isAllExpanded && { expandedRows: action.payload.data.map(({ id }) => id) }
5555
};
5656

src/Store/Reducers/InventoryEntitiesReducer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function modifyInventory(columns, state, action) {
5151
...row,
5252
selected: state.selectedRows[row.id] === true
5353
})),
54-
prevLoadedRows: unionBy(state.prevLoadedRows, action.payload.results, 'id')
54+
prevLoadedRows: unionBy(action.payload.results, state.prevLoadedRows, 'id')
5555
};
5656
}
5757

0 commit comments

Comments
 (0)