diff --git a/src/Helpers/CVEHelper.js b/src/Helpers/CVEHelper.js index c15f5ceca..a2eb18b3b 100644 --- a/src/Helpers/CVEHelper.js +++ b/src/Helpers/CVEHelper.js @@ -193,7 +193,7 @@ export const systemTableRowActions = (rowData, optOutFunc) => [ : ), onClick: (event, rowId, rowData) => { - optOutFunc({ [rowData.id]: true }, rowData.display_name, !rowData.opt_out); + optOutFunc([rowData], rowData.display_name, !rowData.opt_out); } } ]; diff --git a/src/Helpers/CVEHelper.test.js b/src/Helpers/CVEHelper.test.js index 2f968d052..db75c55c7 100644 --- a/src/Helpers/CVEHelper.test.js +++ b/src/Helpers/CVEHelper.test.js @@ -263,6 +263,6 @@ describe('CVEHelper', () => { const rawData = { id: 'testId', display_name: 'testName', opt_out: true }; const actions = systemTableRowActions(rawData, optOutFunc); actions[0].onClick(null, null, rawData); - expect((optOutFunc)).toHaveBeenCalledWith({ testId: true }, 'testName', false); + expect((optOutFunc)).toHaveBeenCalledWith([{"display_name": "testName", "id": "testId", "opt_out": true}], 'testName', false); }) });