@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.
@@ -818,7 +818,6 @@
818
818
  getDefaultOptions: instance => {
819
819
  return {
820
820
  onExpandedChange: makeStateUpdater('expanded', instance),
821
- autoResetExpanded: true,
822
821
  paginateExpandedRows: true
823
822
  };
824
823
  },
@@ -827,6 +826,8 @@
827
826
  let queued = false;
828
827
  return {
829
828
  _autoResetExpanded: () => {
829
+ var _ref, _instance$options$aut;
830
+
830
831
  if (!registered) {
831
832
  instance._queue(() => {
832
833
  registered = true;
@@ -835,11 +836,7 @@
835
836
  return;
836
837
  }
837
838
 
838
- if (instance.options.autoResetAll === false) {
839
- return;
840
- }
841
-
842
- if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
839
+ if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetExpanded) != null ? _ref : !instance.options.manualExpanding) {
843
840
  if (queued) return;
844
841
  queued = true;
845
842
 
@@ -903,7 +900,7 @@
903
900
  });
904
901
  return maxDepth;
905
902
  },
906
- getPreExpandedRowModel: () => instance.getGroupedRowModel(),
903
+ getPreExpandedRowModel: () => instance.getSortedRowModel(),
907
904
  getExpandedRowModel: () => {
908
905
  if (!instance._getExpandedRowModel && instance.options.getExpandedRowModel) {
909
906
  instance._getExpandedRowModel = instance.options.getExpandedRowModel(instance);
@@ -1504,7 +1501,7 @@
1504
1501
 
1505
1502
  instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
1506
1503
  },
1507
- getPreGroupedRowModel: () => instance.getSortedRowModel(),
1504
+ getPreGroupedRowModel: () => instance.getFilteredRowModel(),
1508
1505
  getGroupedRowModel: () => {
1509
1506
  if (!instance._getGroupedRowModel && instance.options.getGroupedRowModel) {
1510
1507
  instance._getGroupedRowModel = instance.options.getGroupedRowModel(instance);
@@ -2117,7 +2114,7 @@
2117
2114
  return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugTable;
2118
2115
  }
2119
2116
  }),
2120
- getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getGroupedRowModel()], (rowSelection, rowModel) => {
2117
+ getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getSortedRowModel()], (rowSelection, rowModel) => {
2121
2118
  if (!Object.keys(rowSelection).length) {
2122
2119
  return {
2123
2120
  rows: [],
@@ -2667,7 +2664,7 @@
2667
2664
 
2668
2665
  instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
2669
2666
  },
2670
- getPreSortedRowModel: () => instance.getFilteredRowModel(),
2667
+ getPreSortedRowModel: () => instance.getGroupedRowModel(),
2671
2668
  getSortedRowModel: () => {
2672
2669
  if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
2673
2670
  instance._getSortedRowModel = instance.options.getSortedRowModel(instance);