@tanstack/react-table 8.0.0-beta.7 → 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 +6 -12
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +6 -12
- 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 +6 -12
- 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
|
|
@@ -1719,7 +1719,7 @@
|
|
|
1719
1719
|
setPageIndex: updater => {
|
|
1720
1720
|
instance.setPagination(old => {
|
|
1721
1721
|
let pageIndex = functionalUpdate(updater, old.pageIndex);
|
|
1722
|
-
const maxPageIndex = typeof
|
|
1722
|
+
const maxPageIndex = typeof instance.options.pageCount !== 'undefined' ? instance.options.pageCount - 1 : Number.MAX_SAFE_INTEGER;
|
|
1723
1723
|
pageIndex = Math.min(Math.max(0, pageIndex), maxPageIndex);
|
|
1724
1724
|
return { ...old,
|
|
1725
1725
|
pageIndex
|
|
@@ -1748,9 +1748,9 @@
|
|
|
1748
1748
|
});
|
|
1749
1749
|
},
|
|
1750
1750
|
setPageCount: updater => instance.setPagination(old => {
|
|
1751
|
-
var
|
|
1751
|
+
var _instance$options$pag;
|
|
1752
1752
|
|
|
1753
|
-
let newPageCount = functionalUpdate(updater, (
|
|
1753
|
+
let newPageCount = functionalUpdate(updater, (_instance$options$pag = instance.options.pageCount) != null ? _instance$options$pag : -1);
|
|
1754
1754
|
|
|
1755
1755
|
if (typeof newPageCount === 'number') {
|
|
1756
1756
|
newPageCount = Math.max(-1, newPageCount);
|
|
@@ -1760,7 +1760,7 @@
|
|
|
1760
1760
|
pageCount: newPageCount
|
|
1761
1761
|
};
|
|
1762
1762
|
}),
|
|
1763
|
-
getPageOptions: memo(() => [instance.
|
|
1763
|
+
getPageOptions: memo(() => [instance.getPageCount()], pageCount => {
|
|
1764
1764
|
let pageOptions = [];
|
|
1765
1765
|
|
|
1766
1766
|
if (pageCount && pageCount > 0) {
|
|
@@ -1814,15 +1814,9 @@
|
|
|
1814
1814
|
return instance._getPaginationRowModel();
|
|
1815
1815
|
},
|
|
1816
1816
|
getPageCount: () => {
|
|
1817
|
-
|
|
1818
|
-
pageCount
|
|
1819
|
-
} = instance.getState().pagination;
|
|
1820
|
-
|
|
1821
|
-
if (typeof pageCount !== 'undefined') {
|
|
1822
|
-
return pageCount;
|
|
1823
|
-
}
|
|
1817
|
+
var _instance$options$pag2;
|
|
1824
1818
|
|
|
1825
|
-
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);
|
|
1826
1820
|
}
|
|
1827
1821
|
};
|
|
1828
1822
|
}
|