@tanstack/table-core 8.0.0-alpha.38 → 8.0.0-alpha.42

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.0.0-alpha.38",
4
+ "version": "8.0.0-alpha.42",
5
5
  "description": "Hooks for building lightweight, fast and extendable datagrids for React",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/tanstack/react-table#readme",
@@ -52,6 +52,7 @@ export type ExpandedInstance<TGenerics extends AnyGenerics> = {
52
52
  toggleAllRowsExpanded: (expanded?: boolean) => void
53
53
  resetExpanded: () => void
54
54
  getRowCanExpand: (rowId: string) => boolean
55
+ getCanSomeRowsExpand: () => boolean
55
56
  getIsRowExpanded: (rowId: string) => boolean
56
57
  getToggleExpandedProps: <TGetter extends Getter<ToggleExpandedProps>>(
57
58
  rowId: string,
@@ -199,6 +200,11 @@ export const Expanding = {
199
200
  !!row.subRows?.length
200
201
  )
201
202
  },
203
+ getCanSomeRowsExpand: () => {
204
+ return Object.keys(instance.getRowModel().rowsById).some(id =>
205
+ instance.getRowCanExpand(id)
206
+ )
207
+ },
202
208
  getToggleExpandedProps: (rowId, userProps) => {
203
209
  const row = instance.getRow(rowId)
204
210
 
@@ -89,7 +89,6 @@ export type FiltersOptions<TGenerics extends AnyGenerics> = {
89
89
  // Global
90
90
  globalFilterType?: FilterType<TGenerics>
91
91
  onGlobalFilterChange?: OnChangeFn<any>
92
- enableGlobalFilters?: boolean
93
92
  autoResetGlobalFilter?: boolean
94
93
  enableGlobalFilter?: boolean
95
94
  getGlobalFilteredRowModel?: (