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