@tanstack/table-core 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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/table-core",
3
3
  "author": "Tanner Linsley",
4
- "version": "8.3.0",
4
+ "version": "8.3.1",
5
5
  "description": "Headless UI for building powerful tables & datagrids for TS/JS.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/tanstack/table#readme",
@@ -283,7 +283,7 @@ export const RowSelection: TableFeature = {
283
283
  )
284
284
 
285
285
  if (isAllRowsSelected) {
286
- if (preFilteredFlatRows.some(row => !rowSelection[row.id])) {
286
+ if (preFilteredFlatRows.some(row => row.getCanSelect() && !rowSelection[row.id])) {
287
287
  isAllRowsSelected = false
288
288
  }
289
289
  }
@@ -308,10 +308,8 @@ export const RowSelection: TableFeature = {
308
308
  },
309
309
 
310
310
  getIsSomeRowsSelected: () => {
311
- return (
312
- !table.getIsAllRowsSelected() &&
313
- !!Object.keys(table.getState().rowSelection ?? {}).length
314
- )
311
+ const totalSelected = Object.keys(table.getState().rowSelection ?? {}).length
312
+ return totalSelected < table.getCoreRowModel().flatRows.length
315
313
  },
316
314
 
317
315
  getIsSomePageRowsSelected: () => {
@@ -319,8 +317,8 @@ export const RowSelection: TableFeature = {
319
317
  return table.getIsAllPageRowsSelected()
320
318
  ? false
321
319
  : paginationFlatRows.some(
322
- d => d.getIsSelected() || d.getIsSomeSelected()
323
- )
320
+ d => d.getIsSelected() || d.getIsSomeSelected()
321
+ )
324
322
  },
325
323
 
326
324
  getToggleAllRowsSelectedHandler: () => {