@tanstack/svelte-table 8.0.0-alpha.68 → 8.0.0-alpha.71

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.
@@ -435,6 +435,16 @@ const defaultColumnSizing = {
435
435
  minSize: 20,
436
436
  maxSize: Number.MAX_SAFE_INTEGER
437
437
  };
438
+
439
+ const getDefaultColumnSizingInfoState = () => ({
440
+ startOffset: null,
441
+ startSize: null,
442
+ deltaOffset: null,
443
+ deltaPercentage: null,
444
+ isResizingColumn: false,
445
+ columnSizingStart: []
446
+ });
447
+
438
448
  const ColumnSizing = {
439
449
  getDefaultColumn: () => {
440
450
  return defaultColumnSizing;
@@ -442,14 +452,7 @@ const ColumnSizing = {
442
452
  getInitialState: state => {
443
453
  return {
444
454
  columnSizing: {},
445
- columnSizingInfo: {
446
- startOffset: null,
447
- startSize: null,
448
- deltaOffset: null,
449
- deltaPercentage: null,
450
- isResizingColumn: false,
451
- columnSizingStart: []
452
- },
455
+ columnSizingInfo: getDefaultColumnSizingInfoState(),
453
456
  ...state
454
457
  };
455
458
  },
@@ -619,42 +622,42 @@ const ColumnSizing = {
619
622
  return {
620
623
  setColumnSizing: updater => instance.options.onColumnSizingChange == null ? void 0 : instance.options.onColumnSizingChange(updater),
621
624
  setColumnSizingInfo: updater => instance.options.onColumnSizingInfoChange == null ? void 0 : instance.options.onColumnSizingInfoChange(updater),
622
- resetColumnSizing: () => {
625
+ resetColumnSizing: defaultState => {
623
626
  var _instance$initialStat;
624
627
 
625
- instance.setColumnSizing((_instance$initialStat = instance.initialState.columnSizing) != null ? _instance$initialStat : {});
628
+ instance.setColumnSizing(defaultState ? {} : (_instance$initialStat = instance.initialState.columnSizing) != null ? _instance$initialStat : {});
626
629
  },
627
- resetHeaderSizeInfo: () => {
630
+ resetHeaderSizeInfo: defaultState => {
628
631
  var _instance$initialStat2;
629
632
 
630
- instance.setColumnSizingInfo((_instance$initialStat2 = instance.initialState.columnSizingInfo) != null ? _instance$initialStat2 : {});
633
+ instance.setColumnSizingInfo(defaultState ? getDefaultColumnSizingInfoState() : (_instance$initialStat2 = instance.initialState.columnSizingInfo) != null ? _instance$initialStat2 : getDefaultColumnSizingInfoState());
631
634
  },
632
635
  getTotalSize: () => {
633
636
  var _instance$getHeaderGr, _instance$getHeaderGr2;
634
637
 
635
638
  return (_instance$getHeaderGr = (_instance$getHeaderGr2 = instance.getHeaderGroups()[0]) == null ? void 0 : _instance$getHeaderGr2.headers.reduce((sum, header) => {
636
- return sum + header.column.getSize();
639
+ return sum + header.getSize();
637
640
  }, 0)) != null ? _instance$getHeaderGr : 0;
638
641
  },
639
642
  getLeftTotalSize: () => {
640
643
  var _instance$getLeftHead, _instance$getLeftHead2;
641
644
 
642
645
  return (_instance$getLeftHead = (_instance$getLeftHead2 = instance.getLeftHeaderGroups()[0]) == null ? void 0 : _instance$getLeftHead2.headers.reduce((sum, header) => {
643
- return sum + header.column.getSize();
646
+ return sum + header.getSize();
644
647
  }, 0)) != null ? _instance$getLeftHead : 0;
645
648
  },
646
649
  getCenterTotalSize: () => {
647
650
  var _instance$getCenterHe, _instance$getCenterHe2;
648
651
 
649
652
  return (_instance$getCenterHe = (_instance$getCenterHe2 = instance.getCenterHeaderGroups()[0]) == null ? void 0 : _instance$getCenterHe2.headers.reduce((sum, header) => {
650
- return sum + header.column.getSize();
653
+ return sum + header.getSize();
651
654
  }, 0)) != null ? _instance$getCenterHe : 0;
652
655
  },
653
656
  getRightTotalSize: () => {
654
657
  var _instance$getRightHea, _instance$getRightHea2;
655
658
 
656
659
  return (_instance$getRightHea = (_instance$getRightHea2 = instance.getRightHeaderGroups()[0]) == null ? void 0 : _instance$getRightHea2.headers.reduce((sum, header) => {
657
- return sum + header.column.getSize();
660
+ return sum + header.getSize();
658
661
  }, 0)) != null ? _instance$getRightHea : 0;
659
662
  }
660
663
  };
@@ -708,10 +711,13 @@ const Expanding = {
708
711
  },
709
712
  createInstance: instance => {
710
713
  let registered = false;
714
+ let queued = false;
711
715
  return {
712
716
  _autoResetExpanded: () => {
713
717
  if (!registered) {
714
- registered = true;
718
+ instance.queue(() => {
719
+ registered = true;
720
+ });
715
721
  return;
716
722
  }
717
723
 
@@ -720,7 +726,12 @@ const Expanding = {
720
726
  }
721
727
 
722
728
  if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
723
- instance.resetExpanded();
729
+ if (queued) return;
730
+ queued = true;
731
+ instance.queue(() => {
732
+ instance.resetExpanded();
733
+ queued = false;
734
+ });
724
735
  }
725
736
  },
726
737
  setExpanded: updater => instance.options.onExpandedChange == null ? void 0 : instance.options.onExpandedChange(updater),
@@ -731,10 +742,10 @@ const Expanding = {
731
742
  instance.setExpanded({});
732
743
  }
733
744
  },
734
- resetExpanded: () => {
745
+ resetExpanded: defaultState => {
735
746
  var _instance$initialStat, _instance$initialStat2;
736
747
 
737
- instance.setExpanded((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.expanded) != null ? _instance$initialStat : {});
748
+ instance.setExpanded(defaultState ? {} : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.expanded) != null ? _instance$initialStat : {});
738
749
  },
739
750
  getCanSomeRowsExpand: () => {
740
751
  return instance.getRowModel().flatRows.some(row => row.getCanExpand());
@@ -1073,7 +1084,7 @@ const Filters = {
1073
1084
  _getFacetedMinMaxValues: instance.options.getFacetedMinMaxValues && instance.options.getFacetedMinMaxValues(instance, column.id),
1074
1085
  getFacetedMinMaxValues: () => {
1075
1086
  if (!column._getFacetedMinMaxValues) {
1076
- return [NaN, NaN];
1087
+ return undefined;
1077
1088
  }
1078
1089
 
1079
1090
  return column._getFacetedMinMaxValues();
@@ -1128,13 +1139,13 @@ const Filters = {
1128
1139
  setGlobalFilter: updater => {
1129
1140
  instance.options.onGlobalFilterChange == null ? void 0 : instance.options.onGlobalFilterChange(updater);
1130
1141
  },
1131
- resetGlobalFilter: () => {
1132
- instance.setGlobalFilter(instance.initialState.globalFilter);
1142
+ resetGlobalFilter: defaultState => {
1143
+ instance.setGlobalFilter(defaultState ? undefined : instance.initialState.globalFilter);
1133
1144
  },
1134
- resetColumnFilters: () => {
1145
+ resetColumnFilters: defaultState => {
1135
1146
  var _instance$initialStat, _instance$initialStat2;
1136
1147
 
1137
- instance.setColumnFilters((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnFilters) != null ? _instance$initialStat : []);
1148
+ instance.setColumnFilters(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnFilters) != null ? _instance$initialStat : []);
1138
1149
  },
1139
1150
  getPreFilteredRowModel: () => instance.getCoreRowModel(),
1140
1151
  _getFilteredRowModel: instance.options.getFilteredRowModel && instance.options.getFilteredRowModel(instance),
@@ -1164,7 +1175,7 @@ const Filters = {
1164
1175
  _getGlobalFacetedMinMaxValues: instance.options.getFacetedMinMaxValues && instance.options.getFacetedMinMaxValues(instance, '__global__'),
1165
1176
  getGlobalFacetedMinMaxValues: () => {
1166
1177
  if (!instance._getGlobalFacetedMinMaxValues) {
1167
- return [NaN, NaN];
1178
+ return;
1168
1179
  }
1169
1180
 
1170
1181
  return instance._getGlobalFacetedMinMaxValues();
@@ -1363,10 +1374,10 @@ const Grouping = {
1363
1374
  createInstance: instance => {
1364
1375
  return {
1365
1376
  setGrouping: updater => instance.options.onGroupingChange == null ? void 0 : instance.options.onGroupingChange(updater),
1366
- resetGrouping: () => {
1377
+ resetGrouping: defaultState => {
1367
1378
  var _instance$initialStat, _instance$initialStat2;
1368
1379
 
1369
- instance.setGrouping((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
1380
+ instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
1370
1381
  },
1371
1382
  getPreGroupedRowModel: () => instance.getSortedRowModel(),
1372
1383
  getGroupedRowModel: () => {
@@ -1443,10 +1454,10 @@ const Ordering = {
1443
1454
  createInstance: instance => {
1444
1455
  return {
1445
1456
  setColumnOrder: updater => instance.options.onColumnOrderChange == null ? void 0 : instance.options.onColumnOrderChange(updater),
1446
- resetColumnOrder: () => {
1457
+ resetColumnOrder: defaultState => {
1447
1458
  var _instance$initialStat;
1448
1459
 
1449
- instance.setColumnOrder((_instance$initialStat = instance.initialState.columnOrder) != null ? _instance$initialStat : []);
1460
+ instance.setColumnOrder(defaultState ? [] : (_instance$initialStat = instance.initialState.columnOrder) != null ? _instance$initialStat : []);
1450
1461
  },
1451
1462
  _getOrderColumnsFn: memo(() => [instance.getState().columnOrder, instance.getState().grouping, instance.options.groupedColumnMode], (columnOrder, grouping, groupedColumnMode) => columns => {
1452
1463
  // Sort grouped columns to the start of the column list
@@ -1484,13 +1495,18 @@ const Ordering = {
1484
1495
  };
1485
1496
 
1486
1497
  //
1498
+ const defaultPageIndex = 0;
1499
+ const defaultPageSize = 10;
1500
+
1501
+ const getDefaultPaginationState = () => ({
1502
+ pageIndex: defaultPageIndex,
1503
+ pageSize: defaultPageSize
1504
+ });
1505
+
1487
1506
  const Pagination = {
1488
1507
  getInitialState: state => {
1489
1508
  return { ...state,
1490
- pagination: {
1491
- pageCount: -1,
1492
- pageIndex: 0,
1493
- pageSize: 10,
1509
+ pagination: { ...getDefaultPaginationState(),
1494
1510
  ...(state == null ? void 0 : state.pagination)
1495
1511
  }
1496
1512
  };
@@ -1503,10 +1519,13 @@ const Pagination = {
1503
1519
  },
1504
1520
  createInstance: instance => {
1505
1521
  let registered = false;
1522
+ let queued = false;
1506
1523
  return {
1507
1524
  _autoResetPageIndex: () => {
1508
1525
  if (!registered) {
1509
- registered = true;
1526
+ instance.queue(() => {
1527
+ registered = true;
1528
+ });
1510
1529
  return;
1511
1530
  }
1512
1531
 
@@ -1515,7 +1534,12 @@ const Pagination = {
1515
1534
  }
1516
1535
 
1517
1536
  if (instance.options.autoResetAll === true || instance.options.autoResetPageIndex) {
1518
- instance.resetPageIndex();
1537
+ if (queued) return;
1538
+ queued = true;
1539
+ instance.queue(() => {
1540
+ instance.resetPageIndex();
1541
+ queued = false;
1542
+ });
1519
1543
  }
1520
1544
  },
1521
1545
  setPagination: updater => {
@@ -1526,14 +1550,10 @@ const Pagination = {
1526
1550
 
1527
1551
  return instance.options.onPaginationChange == null ? void 0 : instance.options.onPaginationChange(safeUpdater);
1528
1552
  },
1529
- resetPagination: () => {
1553
+ resetPagination: defaultState => {
1530
1554
  var _instance$initialStat;
1531
1555
 
1532
- instance.setPagination((_instance$initialStat = instance.initialState.pagination) != null ? _instance$initialStat : {
1533
- pageIndex: 0,
1534
- pageSize: 10,
1535
- pageCount: -1
1536
- });
1556
+ instance.setPagination(defaultState ? getDefaultPaginationState() : (_instance$initialStat = instance.initialState.pagination) != null ? _instance$initialStat : getDefaultPaginationState());
1537
1557
  },
1538
1558
  setPageIndex: updater => {
1539
1559
  instance.setPagination(old => {
@@ -1545,13 +1565,15 @@ const Pagination = {
1545
1565
  };
1546
1566
  });
1547
1567
  },
1548
- resetPageIndex: () => {
1549
- instance.setPageIndex(0);
1550
- },
1551
- resetPageSize: () => {
1568
+ resetPageIndex: defaultState => {
1552
1569
  var _instance$initialStat2, _instance$initialStat3, _instance$initialStat4;
1553
1570
 
1554
- instance.setPageSize((_instance$initialStat2 = (_instance$initialStat3 = instance.initialState) == null ? void 0 : (_instance$initialStat4 = _instance$initialStat3.pagination) == null ? void 0 : _instance$initialStat4.pageSize) != null ? _instance$initialStat2 : 10);
1571
+ instance.setPageIndex(defaultState ? defaultPageIndex : (_instance$initialStat2 = (_instance$initialStat3 = instance.initialState) == null ? void 0 : (_instance$initialStat4 = _instance$initialStat3.pagination) == null ? void 0 : _instance$initialStat4.pageIndex) != null ? _instance$initialStat2 : defaultPageIndex);
1572
+ },
1573
+ resetPageSize: defaultState => {
1574
+ var _instance$initialStat5, _instance$initialStat6, _instance$initialStat7;
1575
+
1576
+ instance.setPageSize(defaultState ? defaultPageSize : (_instance$initialStat5 = (_instance$initialStat6 = instance.initialState) == null ? void 0 : (_instance$initialStat7 = _instance$initialStat6.pagination) == null ? void 0 : _instance$initialStat7.pageSize) != null ? _instance$initialStat5 : defaultPageSize);
1555
1577
  },
1556
1578
  setPageSize: updater => {
1557
1579
  instance.setPagination(old => {
@@ -1565,7 +1587,9 @@ const Pagination = {
1565
1587
  });
1566
1588
  },
1567
1589
  setPageCount: updater => instance.setPagination(old => {
1568
- let newPageCount = functionalUpdate(updater, old.pageCount);
1590
+ var _old$pageCount;
1591
+
1592
+ let newPageCount = functionalUpdate(updater, (_old$pageCount = old.pageCount) != null ? _old$pageCount : -1);
1569
1593
 
1570
1594
  if (typeof newPageCount === 'number') {
1571
1595
  newPageCount = Math.max(-1, newPageCount);
@@ -1633,7 +1657,7 @@ const Pagination = {
1633
1657
  pageCount
1634
1658
  } = instance.getState().pagination;
1635
1659
 
1636
- if (pageCount > 0) {
1660
+ if (typeof pageCount !== 'undefined') {
1637
1661
  return pageCount;
1638
1662
  }
1639
1663
 
@@ -1644,13 +1668,15 @@ const Pagination = {
1644
1668
  };
1645
1669
 
1646
1670
  //
1671
+ const getDefaultPinningState = () => ({
1672
+ left: [],
1673
+ right: []
1674
+ });
1675
+
1647
1676
  const Pinning = {
1648
1677
  getInitialState: state => {
1649
1678
  return {
1650
- columnPinning: {
1651
- left: [],
1652
- right: []
1653
- },
1679
+ columnPinning: getDefaultPinningState(),
1654
1680
  ...state
1655
1681
  };
1656
1682
  },
@@ -1760,10 +1786,10 @@ const Pinning = {
1760
1786
  createInstance: instance => {
1761
1787
  return {
1762
1788
  setColumnPinning: updater => instance.options.onColumnPinningChange == null ? void 0 : instance.options.onColumnPinningChange(updater),
1763
- resetColumnPinning: () => {
1789
+ resetColumnPinning: defaultState => {
1764
1790
  var _instance$initialStat, _instance$initialStat2;
1765
1791
 
1766
- return instance.setColumnPinning((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnPinning) != null ? _instance$initialStat : {});
1792
+ return instance.setColumnPinning(defaultState ? getDefaultPinningState() : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.columnPinning) != null ? _instance$initialStat : getDefaultPinningState());
1767
1793
  },
1768
1794
  getIsSomeColumnsPinned: () => {
1769
1795
  const {
@@ -1829,10 +1855,10 @@ const RowSelection = {
1829
1855
  createInstance: instance => {
1830
1856
  return {
1831
1857
  setRowSelection: updater => instance.options.onRowSelectionChange == null ? void 0 : instance.options.onRowSelectionChange(updater),
1832
- resetRowSelection: () => {
1858
+ resetRowSelection: defaultState => {
1833
1859
  var _instance$initialStat;
1834
1860
 
1835
- return instance.setRowSelection((_instance$initialStat = instance.initialState.rowSelection) != null ? _instance$initialStat : {});
1861
+ return instance.setRowSelection(defaultState ? {} : (_instance$initialStat = instance.initialState.rowSelection) != null ? _instance$initialStat : {});
1836
1862
  },
1837
1863
  toggleAllRowsSelected: value => {
1838
1864
  instance.setRowSelection(old => {
@@ -2459,14 +2485,9 @@ const Sorting = {
2459
2485
 
2460
2486
  return (_instance$getState$so2 = (_instance$getState$so3 = instance.getState().sorting) == null ? void 0 : _instance$getState$so3.findIndex(d => d.id === column.id)) != null ? _instance$getState$so2 : -1;
2461
2487
  },
2462
- resetSorting: columnId => {
2463
- if (columnId) {
2464
- instance.setSorting(old => old != null && old.length ? old.filter(d => d.id !== columnId) : []);
2465
- } else {
2466
- var _instance$initialStat, _instance$initialStat2;
2467
-
2468
- instance.setSorting((_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
2469
- }
2488
+ clearSorting: () => {
2489
+ //clear sorting for just 1 column
2490
+ instance.setSorting(old => old != null && old.length ? old.filter(d => d.id !== column.id) : []);
2470
2491
  },
2471
2492
  getToggleSortingHandler: () => {
2472
2493
  const canSort = column.getCanSort();
@@ -2481,6 +2502,11 @@ const Sorting = {
2481
2502
  createInstance: instance => {
2482
2503
  return {
2483
2504
  setSorting: updater => instance.options.onSortingChange == null ? void 0 : instance.options.onSortingChange(updater),
2505
+ resetSorting: defaultState => {
2506
+ var _instance$initialStat, _instance$initialStat2;
2507
+
2508
+ instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
2509
+ },
2484
2510
  getPreSortedRowModel: () => instance.getFilteredRowModel(),
2485
2511
  getSortedRowModel: () => {
2486
2512
  if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
@@ -2584,6 +2610,11 @@ const Visibility = {
2584
2610
  getRightVisibleLeafColumns: makeVisibleColumnsMethod('getRightVisibleLeafColumns', () => instance.getRightLeafColumns()),
2585
2611
  getCenterVisibleLeafColumns: makeVisibleColumnsMethod('getCenterVisibleLeafColumns', () => instance.getCenterLeafColumns()),
2586
2612
  setColumnVisibility: updater => instance.options.onColumnVisibilityChange == null ? void 0 : instance.options.onColumnVisibilityChange(updater),
2613
+ resetColumnVisibility: defaultState => {
2614
+ var _instance$initialStat;
2615
+
2616
+ instance.setColumnVisibility(defaultState ? {} : (_instance$initialStat = instance.initialState.columnVisibility) != null ? _instance$initialStat : {});
2617
+ },
2587
2618
  toggleAllColumnsVisible: value => {
2588
2619
  var _value;
2589
2620
 
@@ -3349,9 +3380,7 @@ function getCoreRowModel() {
3349
3380
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3350
3381
  },
3351
3382
  onChange: () => {
3352
- instance.queue(() => {
3353
- instance._autoResetPageIndex();
3354
- });
3383
+ instance._autoResetPageIndex();
3355
3384
  }
3356
3385
  });
3357
3386
  }
@@ -3557,9 +3586,7 @@ function getFilteredRowModel() {
3557
3586
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3558
3587
  },
3559
3588
  onChange: () => {
3560
- instance.queue(() => {
3561
- instance._autoResetPageIndex();
3562
- });
3589
+ instance._autoResetPageIndex();
3563
3590
  }
3564
3591
  });
3565
3592
  }
@@ -3627,14 +3654,20 @@ function getFacetedUniqueValues() {
3627
3654
 
3628
3655
  function getFacetedMinMaxValues() {
3629
3656
  return (instance, columnId) => memo(() => [instance.getColumn(columnId).getFacetedRowModel()], facetedRowModel => {
3630
- var _facetedRowModel$flat, _facetedRowModel$flat2, _facetedRowModel$flat3, _facetedRowModel$flat4;
3657
+ var _facetedRowModel$flat;
3631
3658
 
3632
- let facetedMinMaxValues = [(_facetedRowModel$flat = (_facetedRowModel$flat2 = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat2.getValue(columnId)) != null ? _facetedRowModel$flat : null, (_facetedRowModel$flat3 = (_facetedRowModel$flat4 = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat4.getValue(columnId)) != null ? _facetedRowModel$flat3 : null];
3659
+ const firstValue = (_facetedRowModel$flat = facetedRowModel.flatRows[0]) == null ? void 0 : _facetedRowModel$flat.getValue(columnId);
3660
+
3661
+ if (typeof firstValue === 'undefined') {
3662
+ return undefined;
3663
+ }
3664
+
3665
+ let facetedMinMaxValues = [firstValue, firstValue];
3633
3666
 
3634
3667
  for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
3635
- var _facetedRowModel$flat5;
3668
+ var _facetedRowModel$flat2;
3636
3669
 
3637
- const value = (_facetedRowModel$flat5 = facetedRowModel.flatRows[i]) == null ? void 0 : _facetedRowModel$flat5.getValue(columnId);
3670
+ const value = (_facetedRowModel$flat2 = facetedRowModel.flatRows[i]) == null ? void 0 : _facetedRowModel$flat2.getValue(columnId);
3638
3671
 
3639
3672
  if (value < facetedMinMaxValues[0]) {
3640
3673
  facetedMinMaxValues[0] = value;
@@ -3742,9 +3775,7 @@ function getSortedRowModel() {
3742
3775
  return (_instance$options$deb = instance.options.debugAll) != null ? _instance$options$deb : instance.options.debugTable;
3743
3776
  },
3744
3777
  onChange: () => {
3745
- instance.queue(() => {
3746
- instance._autoResetPageIndex();
3747
- });
3778
+ instance._autoResetPageIndex();
3748
3779
  }
3749
3780
  });
3750
3781
  }