Skip to content

Commit

Permalink
fix(data-table): use correct aria-label for indeterminate unselect all (
Browse files Browse the repository at this point in the history
  • Loading branch information
jendowns authored and jnm2377 committed Nov 6, 2019
1 parent a3d13e1 commit 10f2fae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react/src/components/DataTable/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,10 @@ export default class DataTable extends React.Component {
const checked = rowCount > 0 && selectedRowCount === rowCount;
const indeterminate =
rowCount > 0 && selectedRowCount > 0 && selectedRowCount !== rowCount;
const translationKey = checked
? translationKeys.unselectAll
: translationKeys.selectAll;
const translationKey =
checked || indeterminate
? translationKeys.unselectAll
: translationKeys.selectAll;
return {
...rest,
ariaLabel: t(translationKey),
Expand Down

0 comments on commit 10f2fae

Please sign in to comment.