@tanstack/react-table 8.3.0 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2158,7 +2158,7 @@ const RowSelection = {
2158
2158
  let isAllRowsSelected = Boolean(preFilteredFlatRows.length && Object.keys(rowSelection).length);
2159
2159
 
2160
2160
  if (isAllRowsSelected) {
2161
- if (preFilteredFlatRows.some(row => !rowSelection[row.id])) {
2161
+ if (preFilteredFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
2162
2162
  isAllRowsSelected = false;
2163
2163
  }
2164
2164
  }
@@ -2181,7 +2181,8 @@ const RowSelection = {
2181
2181
  getIsSomeRowsSelected: () => {
2182
2182
  var _table$getState$rowSe;
2183
2183
 
2184
- return !table.getIsAllRowsSelected() && !!Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
2184
+ const totalSelected = Object.keys((_table$getState$rowSe = table.getState().rowSelection) != null ? _table$getState$rowSe : {}).length;
2185
+ return totalSelected < table.getCoreRowModel().flatRows.length;
2185
2186
  },
2186
2187
  getIsSomePageRowsSelected: () => {
2187
2188
  const paginationFlatRows = table.getPaginationRowModel().flatRows;