Skip to content

Commit

Permalink
fix(table): select all checkbox state on initial render
Browse files Browse the repository at this point in the history
  • Loading branch information
erzhan-temir-mamyrov committed Jun 16, 2023
1 parent fdf14bc commit 4397a9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react/src/components/Table/tableReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,11 @@ export const tableReducer = (state = {}, action) => {

const selectedIds = view ? view.table.selectedIds : [];
const isSelectingAll = isMultiSelect && selectedIds?.length === allRowsId.length;
const isSelectAllSelected = view ? view.table.isSelectAllSelected || isSelectingAll : false;
const isSelectAllSelected = isSelectingAll
? true
: view
? view.table.isSelectAllSelected
: false;

return update(state, {
data: {
Expand Down

0 comments on commit 4397a9f

Please sign in to comment.