@tanstack/svelte-table 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.
@@ -827,7 +827,6 @@ const Expanding = {
827
827
  getDefaultOptions: instance => {
828
828
  return {
829
829
  onExpandedChange: makeStateUpdater('expanded', instance),
830
- autoResetExpanded: true,
831
830
  paginateExpandedRows: true
832
831
  };
833
832
  },
@@ -836,6 +835,8 @@ const Expanding = {
836
835
  let queued = false;
837
836
  return {
838
837
  _autoResetExpanded: () => {
838
+ var _ref, _instance$options$aut;
839
+
839
840
  if (!registered) {
840
841
  instance._queue(() => {
841
842
  registered = true;
@@ -844,11 +845,7 @@ const Expanding = {
844
845
  return;
845
846
  }
846
847
 
847
- if (instance.options.autoResetAll === false) {
848
- return;
849
- }
850
-
851
- if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
848
+ if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetExpanded) != null ? _ref : !instance.options.manualExpanding) {
852
849
  if (queued) return;
853
850
  queued = true;
854
851
 
@@ -912,7 +909,7 @@ const Expanding = {
912
909
  });
913
910
  return maxDepth;
914
911
  },
915
- getPreExpandedRowModel: () => instance.getGroupedRowModel(),
912
+ getPreExpandedRowModel: () => instance.getSortedRowModel(),
916
913
  getExpandedRowModel: () => {
917
914
  if (!instance._getExpandedRowModel && instance.options.getExpandedRowModel) {
918
915
  instance._getExpandedRowModel = instance.options.getExpandedRowModel(instance);
@@ -1513,7 +1510,7 @@ const Grouping = {
1513
1510
 
1514
1511
  instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
1515
1512
  },
1516
- getPreGroupedRowModel: () => instance.getSortedRowModel(),
1513
+ getPreGroupedRowModel: () => instance.getFilteredRowModel(),
1517
1514
  getGroupedRowModel: () => {
1518
1515
  if (!instance._getGroupedRowModel && instance.options.getGroupedRowModel) {
1519
1516
  instance._getGroupedRowModel = instance.options.getGroupedRowModel(instance);
@@ -2126,7 +2123,7 @@ const RowSelection = {
2126
2123
  return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugTable;
2127
2124
  }
2128
2125
  }),
2129
- getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getGroupedRowModel()], (rowSelection, rowModel) => {
2126
+ getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getSortedRowModel()], (rowSelection, rowModel) => {
2130
2127
  if (!Object.keys(rowSelection).length) {
2131
2128
  return {
2132
2129
  rows: [],
@@ -2676,7 +2673,7 @@ const Sorting = {
2676
2673
 
2677
2674
  instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
2678
2675
  },
2679
- getPreSortedRowModel: () => instance.getFilteredRowModel(),
2676
+ getPreSortedRowModel: () => instance.getGroupedRowModel(),
2680
2677
  getSortedRowModel: () => {
2681
2678
  if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
2682
2679
  instance._getSortedRowModel = instance.options.getSortedRowModel(instance);