Skip to content

Commit

Permalink
feat(DataTable): close batch actions when selected items are removed (#…
Browse files Browse the repository at this point in the history
…9679)

Co-authored-by: Scott Strubberg <sstrubberg@protonmail.com>
  • Loading branch information
FrivalszkyP and sstrubberg committed Sep 20, 2021
1 parent f299ccb commit 1254da5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/DataTable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export default class DataTable extends React.Component {
const totalSelected = this.getSelectedRows().length;
return {
...props,
shouldShowBatchActions,
shouldShowBatchActions: shouldShowBatchActions && totalSelected > 0,
totalSelected,
onCancel: this.handleOnCancel,
};
Expand Down

0 comments on commit 1254da5

Please sign in to comment.