@tanstack/table-core 8.0.0-beta.5 → 8.0.0-beta.6

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-beta.5",
4
+ "version": "8.0.0-beta.6",
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",
@@ -63,7 +63,6 @@ export const Expanding: TableFeature = {
63
63
  ): ExpandedOptions<TGenerics> => {
64
64
  return {
65
65
  onExpandedChange: makeStateUpdater('expanded', instance),
66
- autoResetExpanded: true,
67
66
  paginateExpandedRows: true,
68
67
  }
69
68
  },
@@ -83,13 +82,10 @@ export const Expanding: TableFeature = {
83
82
  return
84
83
  }
85
84
 
86
- if (instance.options.autoResetAll === false) {
87
- return
88
- }
89
-
90
85
  if (
91
- instance.options.autoResetAll === true ||
92
- instance.options.autoResetExpanded
86
+ instance.options.autoResetAll ??
87
+ instance.options.autoResetExpanded ??
88
+ !instance.options.manualExpanding
93
89
  ) {
94
90
  if (queued) return
95
91
  queued = true
@@ -160,7 +156,7 @@ export const Expanding: TableFeature = {
160
156
 
161
157
  return maxDepth
162
158
  },
163
- getPreExpandedRowModel: () => instance.getGroupedRowModel(),
159
+ getPreExpandedRowModel: () => instance.getSortedRowModel(),
164
160
  getExpandedRowModel: () => {
165
161
  if (
166
162
  !instance._getExpandedRowModel &&
@@ -214,7 +214,7 @@ export const Grouping: TableFeature = {
214
214
  )
215
215
  },
216
216
 
217
- getPreGroupedRowModel: () => instance.getSortedRowModel(),
217
+ getPreGroupedRowModel: () => instance.getFilteredRowModel(),
218
218
  getGroupedRowModel: () => {
219
219
  if (
220
220
  !instance._getGroupedRowModel &&
@@ -245,7 +245,7 @@ export const RowSelection: TableFeature = {
245
245
  ),
246
246
 
247
247
  getGroupedSelectedRowModel: memo(
248
- () => [instance.getState().rowSelection, instance.getGroupedRowModel()],
248
+ () => [instance.getState().rowSelection, instance.getSortedRowModel()],
249
249
  (rowSelection, rowModel) => {
250
250
  if (!Object.keys(rowSelection).length) {
251
251
  return {
@@ -345,8 +345,6 @@ export const Sorting: TableFeature = {
345
345
  createInstance: <TGenerics extends TableGenerics>(
346
346
  instance: TableInstance<TGenerics>
347
347
  ): SortingInstance<TGenerics> => {
348
- let registered = false
349
-
350
348
  return {
351
349
  setSorting: updater => instance.options.onSortingChange?.(updater),
352
350
  resetSorting: defaultState => {
@@ -354,7 +352,7 @@ export const Sorting: TableFeature = {
354
352
  defaultState ? [] : instance.initialState?.sorting ?? []
355
353
  )
356
354
  },
357
- getPreSortedRowModel: () => instance.getFilteredRowModel(),
355
+ getPreSortedRowModel: () => instance.getGroupedRowModel(),
358
356
  getSortedRowModel: () => {
359
357
  if (
360
358
  !instance._getSortedRowModel &&