Skip to content

Commit

Permalink
fix: Fix exclude/include from Systems table row actions (#1719)
Browse files Browse the repository at this point in the history
  • Loading branch information
leSamo authored Jul 7, 2022
1 parent 773088e commit 825dbcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Helpers/CVEHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const systemTableRowActions = (rowData, optOutFunc) => [
: <FormattedMessage {...messages.systemKebabExcludeAnalysis} values={{ count: 1 }} />
),
onClick: (event, rowId, rowData) => {
optOutFunc({ [rowData.id]: true }, rowData.display_name, !rowData.opt_out);
optOutFunc([rowData], rowData.display_name, !rowData.opt_out);
}
}
];
2 changes: 1 addition & 1 deletion src/Helpers/CVEHelper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
});

0 comments on commit 825dbcd

Please sign in to comment.