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