@tanstack/svelte-table 8.0.0-alpha.72 → 8.0.0-alpha.73

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.
@@ -386,7 +386,7 @@ const Cells = {
386
386
  row,
387
387
  column,
388
388
  getValue: () => row.getValue(columnId),
389
- renderCell: () => column.cell ? instance.render(column.cell, {
389
+ renderCell: () => column.cell ? instance._render(column.cell, {
390
390
  instance,
391
391
  column,
392
392
  row,
@@ -714,9 +714,10 @@ const Expanding = {
714
714
  return {
715
715
  _autoResetExpanded: () => {
716
716
  if (!registered) {
717
- instance.queue(() => {
717
+ instance._queue(() => {
718
718
  registered = true;
719
719
  });
720
+
720
721
  return;
721
722
  }
722
723
 
@@ -727,7 +728,8 @@ const Expanding = {
727
728
  if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
728
729
  if (queued) return;
729
730
  queued = true;
730
- instance.queue(() => {
731
+
732
+ instance._queue(() => {
731
733
  instance.resetExpanded();
732
734
  queued = false;
733
735
  });
@@ -1411,7 +1413,7 @@ const Grouping = {
1411
1413
  var _column$aggregatedCel;
1412
1414
 
1413
1415
  const template = (_column$aggregatedCel = column.aggregatedCell) != null ? _column$aggregatedCel : column.cell;
1414
- return template ? instance.render(template, {
1416
+ return template ? instance._render(template, {
1415
1417
  instance,
1416
1418
  column,
1417
1419
  row,
@@ -1512,8 +1514,7 @@ const Pagination = {
1512
1514
  },
1513
1515
  getDefaultOptions: instance => {
1514
1516
  return {
1515
- onPaginationChange: makeStateUpdater('pagination', instance),
1516
- autoResetPageIndex: true
1517
+ onPaginationChange: makeStateUpdater('pagination', instance)
1517
1518
  };
1518
1519
  },
1519
1520
  createInstance: instance => {
@@ -1521,21 +1522,21 @@ const Pagination = {
1521
1522
  let queued = false;
1522
1523
  return {
1523
1524
  _autoResetPageIndex: () => {
1525
+ var _ref, _instance$options$aut;
1526
+
1524
1527
  if (!registered) {
1525
- instance.queue(() => {
1528
+ instance._queue(() => {
1526
1529
  registered = true;
1527
1530
  });
1528
- return;
1529
- }
1530
1531
 
1531
- if (instance.options.autoResetAll === false) {
1532
1532
  return;
1533
1533
  }
1534
1534
 
1535
- if (instance.options.autoResetAll === true || instance.options.autoResetPageIndex) {
1535
+ if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetPageIndex) != null ? _ref : !instance.options.manualPagination) {
1536
1536
  if (queued) return;
1537
1537
  queued = true;
1538
- instance.queue(() => {
1538
+
1539
+ instance._queue(() => {
1539
1540
  instance.resetPageIndex();
1540
1541
  queued = false;
1541
1542
  });
@@ -1557,7 +1558,7 @@ const Pagination = {
1557
1558
  setPageIndex: updater => {
1558
1559
  instance.setPagination(old => {
1559
1560
  let pageIndex = functionalUpdate(updater, old.pageIndex);
1560
- const maxPageIndex = old.pageCount && old.pageCount > 0 ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1561
+ const maxPageIndex = typeof old.pageCount !== 'undefined' ? old.pageCount - 1 : Number.MAX_SAFE_INTEGER;
1561
1562
  pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
1562
1563
  return { ...old,
1563
1564
  pageIndex
@@ -2668,12 +2669,12 @@ const Headers = {
2668
2669
  recurseHeader(header);
2669
2670
  return leafHeaders;
2670
2671
  },
2671
- renderHeader: () => column.header ? instance.render(column.header, {
2672
+ renderHeader: () => column.header ? instance._render(column.header, {
2672
2673
  instance,
2673
2674
  header: header,
2674
2675
  column
2675
2676
  }) : null,
2676
- renderFooter: () => column.footer ? instance.render(column.footer, {
2677
+ renderFooter: () => column.footer ? instance._render(column.footer, {
2677
2678
  instance,
2678
2679
  header: header,
2679
2680
  column
@@ -3147,7 +3148,7 @@ function createTableInstance$1(options) {
3147
3148
  ...options
3148
3149
  },
3149
3150
  initialState,
3150
- queue: cb => {
3151
+ _queue: cb => {
3151
3152
  queued.push(cb);
3152
3153
 
3153
3154
  if (!queuedTimeout) {
@@ -3205,7 +3206,7 @@ function createTableInstance$1(options) {
3205
3206
  const newOptions = functionalUpdate(updater, instance.options);
3206
3207
  instance.options = mergeOptions(newOptions);
3207
3208
  },
3208
- render: (template, props) => {
3209
+ _render: (template, props) => {
3209
3210
  if (typeof instance.options.render === 'function') {
3210
3211
  return instance.options.render(template, props);
3211
3212
  }
@@ -3904,7 +3905,7 @@ function getGroupedRowModel() {
3904
3905
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3905
3906
  },
3906
3907
  onChange: () => {
3907
- instance.queue(() => {
3908
+ instance._queue(() => {
3908
3909
  instance._autoResetExpanded();
3909
3910
 
3910
3911
  instance._autoResetPageIndex();