@tanstack/react-table 8.0.0-beta.5 → 8.0.0-beta.8
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.
- package/build/cjs/table-core/build/esm/index.js +14 -23
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +14 -23
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +17 -17
- package/build/umd/index.development.js +14 -23
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
package/build/stats-html.html
CHANGED
|
@@ -2669,7 +2669,7 @@ var drawChart = (function (exports) {
|
|
|
2669
2669
|
</script>
|
|
2670
2670
|
<script>
|
|
2671
2671
|
/*<!--*/
|
|
2672
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"
|
|
2672
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"packages","children":[{"name":"table-core/build/esm/index.js","uid":"6e21-127"},{"name":"react-table/src/index.tsx","uid":"6e21-129"}]}]}],"isRoot":true},"nodeParts":{"6e21-127":{"renderedLength":138740,"gzipLength":23599,"brotliLength":0,"mainUid":"6e21-126"},"6e21-129":{"renderedLength":2135,"gzipLength":854,"brotliLength":0,"mainUid":"6e21-128"}},"nodeMetas":{"6e21-126":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6e21-127"},"imported":[],"importedBy":[{"uid":"6e21-128"}]},"6e21-128":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"6e21-129"},"imported":[{"uid":"6e21-130"},{"uid":"6e21-126"}],"importedBy":[],"isEntry":true},"6e21-130":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"6e21-128"}],"isExternal":true}},"env":{"rollup":"2.70.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
2673
2673
|
|
|
2674
2674
|
const run = () => {
|
|
2675
2675
|
const width = window.innerWidth;
|
package/build/stats-react.json
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
13
|
"name": "table-core/build/esm/index.js",
|
|
14
|
-
"uid": "
|
|
14
|
+
"uid": "6e21-132"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "6e21-134"
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -25,55 +25,55 @@
|
|
|
25
25
|
"isRoot": true
|
|
26
26
|
},
|
|
27
27
|
"nodeParts": {
|
|
28
|
-
"
|
|
29
|
-
"renderedLength":
|
|
30
|
-
"gzipLength":
|
|
28
|
+
"6e21-132": {
|
|
29
|
+
"renderedLength": 138740,
|
|
30
|
+
"gzipLength": 23599,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "6e21-131"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"6e21-134": {
|
|
35
35
|
"renderedLength": 2135,
|
|
36
36
|
"gzipLength": 854,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "6e21-133"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"6e21-131": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "6e21-132"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "6e21-133"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"6e21-133": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "6e21-134"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "6e21-135"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "6e21-131"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"6e21-135": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "6e21-133"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
@@ -848,7 +848,6 @@
|
|
|
848
848
|
getDefaultOptions: instance => {
|
|
849
849
|
return {
|
|
850
850
|
onExpandedChange: makeStateUpdater('expanded', instance),
|
|
851
|
-
autoResetExpanded: true,
|
|
852
851
|
paginateExpandedRows: true
|
|
853
852
|
};
|
|
854
853
|
},
|
|
@@ -857,6 +856,8 @@
|
|
|
857
856
|
let queued = false;
|
|
858
857
|
return {
|
|
859
858
|
_autoResetExpanded: () => {
|
|
859
|
+
var _ref, _instance$options$aut;
|
|
860
|
+
|
|
860
861
|
if (!registered) {
|
|
861
862
|
instance._queue(() => {
|
|
862
863
|
registered = true;
|
|
@@ -865,11 +866,7 @@
|
|
|
865
866
|
return;
|
|
866
867
|
}
|
|
867
868
|
|
|
868
|
-
if (instance.options.autoResetAll
|
|
869
|
-
return;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
if (instance.options.autoResetAll === true || instance.options.autoResetExpanded) {
|
|
869
|
+
if ((_ref = (_instance$options$aut = instance.options.autoResetAll) != null ? _instance$options$aut : instance.options.autoResetExpanded) != null ? _ref : !instance.options.manualExpanding) {
|
|
873
870
|
if (queued) return;
|
|
874
871
|
queued = true;
|
|
875
872
|
|
|
@@ -933,7 +930,7 @@
|
|
|
933
930
|
});
|
|
934
931
|
return maxDepth;
|
|
935
932
|
},
|
|
936
|
-
getPreExpandedRowModel: () => instance.
|
|
933
|
+
getPreExpandedRowModel: () => instance.getSortedRowModel(),
|
|
937
934
|
getExpandedRowModel: () => {
|
|
938
935
|
if (!instance._getExpandedRowModel && instance.options.getExpandedRowModel) {
|
|
939
936
|
instance._getExpandedRowModel = instance.options.getExpandedRowModel(instance);
|
|
@@ -1534,7 +1531,7 @@
|
|
|
1534
1531
|
|
|
1535
1532
|
instance.setGrouping(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.grouping) != null ? _instance$initialStat : []);
|
|
1536
1533
|
},
|
|
1537
|
-
getPreGroupedRowModel: () => instance.
|
|
1534
|
+
getPreGroupedRowModel: () => instance.getFilteredRowModel(),
|
|
1538
1535
|
getGroupedRowModel: () => {
|
|
1539
1536
|
if (!instance._getGroupedRowModel && instance.options.getGroupedRowModel) {
|
|
1540
1537
|
instance._getGroupedRowModel = instance.options.getGroupedRowModel(instance);
|
|
@@ -1567,7 +1564,7 @@
|
|
|
1567
1564
|
getIsAggregated: () => {
|
|
1568
1565
|
var _row$subRows;
|
|
1569
1566
|
|
|
1570
|
-
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && ((_row$subRows = row.subRows)
|
|
1567
|
+
return !cell.getIsGrouped() && !cell.getIsPlaceholder() && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
1571
1568
|
},
|
|
1572
1569
|
renderAggregatedCell: () => {
|
|
1573
1570
|
{
|
|
@@ -1722,7 +1719,7 @@
|
|
|
1722
1719
|
setPageIndex: updater => {
|
|
1723
1720
|
instance.setPagination(old => {
|
|
1724
1721
|
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1725
|
-
const maxPageIndex = typeof
|
|
1722
|
+
const maxPageIndex = typeof instance.options.pageCount !== 'undefined' ? instance.options.pageCount - 1 : Number.MAX_SAFE_INTEGER;
|
|
1726
1723
|
pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
|
|
1727
1724
|
return { ...old,
|
|
1728
1725
|
pageIndex
|
|
@@ -1751,9 +1748,9 @@
|
|
|
1751
1748
|
});
|
|
1752
1749
|
},
|
|
1753
1750
|
setPageCount: updater => instance.setPagination(old => {
|
|
1754
|
-
var
|
|
1751
|
+
var _instance$options$pag;
|
|
1755
1752
|
|
|
1756
|
-
let newPageCount = functionalUpdate(updater, (
|
|
1753
|
+
let newPageCount = functionalUpdate(updater, (_instance$options$pag = instance.options.pageCount) != null ? _instance$options$pag : -1);
|
|
1757
1754
|
|
|
1758
1755
|
if (typeof newPageCount === 'number') {
|
|
1759
1756
|
newPageCount = Math.max(-1, newPageCount);
|
|
@@ -1763,7 +1760,7 @@
|
|
|
1763
1760
|
pageCount: newPageCount
|
|
1764
1761
|
};
|
|
1765
1762
|
}),
|
|
1766
|
-
getPageOptions: memo(() => [instance.
|
|
1763
|
+
getPageOptions: memo(() => [instance.getPageCount()], pageCount => {
|
|
1767
1764
|
let pageOptions = [];
|
|
1768
1765
|
|
|
1769
1766
|
if (pageCount && pageCount > 0) {
|
|
@@ -1817,15 +1814,9 @@
|
|
|
1817
1814
|
return instance._getPaginationRowModel();
|
|
1818
1815
|
},
|
|
1819
1816
|
getPageCount: () => {
|
|
1820
|
-
|
|
1821
|
-
pageCount
|
|
1822
|
-
} = instance.getState().pagination;
|
|
1823
|
-
|
|
1824
|
-
if (typeof pageCount !== 'undefined') {
|
|
1825
|
-
return pageCount;
|
|
1826
|
-
}
|
|
1817
|
+
var _instance$options$pag2;
|
|
1827
1818
|
|
|
1828
|
-
return Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize);
|
|
1819
|
+
return (_instance$options$pag2 = instance.options.pageCount) != null ? _instance$options$pag2 : Math.ceil(instance.getPrePaginationRowModel().rows.length / instance.getState().pagination.pageSize);
|
|
1829
1820
|
}
|
|
1830
1821
|
};
|
|
1831
1822
|
}
|
|
@@ -2147,7 +2138,7 @@
|
|
|
2147
2138
|
return (_instance$options$deb2 = instance.options.debugAll) != null ? _instance$options$deb2 : instance.options.debugTable;
|
|
2148
2139
|
}
|
|
2149
2140
|
}),
|
|
2150
|
-
getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.
|
|
2141
|
+
getGroupedSelectedRowModel: memo(() => [instance.getState().rowSelection, instance.getSortedRowModel()], (rowSelection, rowModel) => {
|
|
2151
2142
|
if (!Object.keys(rowSelection).length) {
|
|
2152
2143
|
return {
|
|
2153
2144
|
rows: [],
|
|
@@ -2697,7 +2688,7 @@
|
|
|
2697
2688
|
|
|
2698
2689
|
instance.setSorting(defaultState ? [] : (_instance$initialStat = (_instance$initialStat2 = instance.initialState) == null ? void 0 : _instance$initialStat2.sorting) != null ? _instance$initialStat : []);
|
|
2699
2690
|
},
|
|
2700
|
-
getPreSortedRowModel: () => instance.
|
|
2691
|
+
getPreSortedRowModel: () => instance.getGroupedRowModel(),
|
|
2701
2692
|
getSortedRowModel: () => {
|
|
2702
2693
|
if (!instance._getSortedRowModel && instance.options.getSortedRowModel) {
|
|
2703
2694
|
instance._getSortedRowModel = instance.options.getSortedRowModel(instance);
|