@tanstack/react-table 8.0.14 → 8.1.0
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/react-table/src/index.js +1 -0
- package/build/cjs/react-table/src/index.js.map +1 -1
- package/build/cjs/table-core/build/esm/index.js +20 -8
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +20 -9
- 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 +20 -8
- 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":"6062-123"},{"name":"react-table/src/index.tsx","uid":"6062-125"}]}]}],"isRoot":true},"nodeParts":{"6062-123":{"renderedLength":134450,"gzipLength":23084,"brotliLength":0,"mainUid":"6062-122"},"6062-125":{"renderedLength":1900,"gzipLength":752,"brotliLength":0,"mainUid":"6062-124"}},"nodeMetas":{"6062-122":{"id":"/packages/table-core/build/esm/index.js","moduleParts":{"index.production.js":"6062-123"},"imported":[],"importedBy":[{"uid":"6062-124"}]},"6062-124":{"id":"/packages/react-table/src/index.tsx","moduleParts":{"index.production.js":"6062-125"},"imported":[{"uid":"6062-126"},{"uid":"6062-122"}],"importedBy":[],"isEntry":true},"6062-126":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"6062-124"}],"isExternal":true}},"env":{"rollup":"2.75.7"},"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": "6062-128"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"name": "react-table/src/index.tsx",
|
|
18
|
-
"uid": "
|
|
18
|
+
"uid": "6062-130"
|
|
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
|
+
"6062-128": {
|
|
29
|
+
"renderedLength": 134450,
|
|
30
|
+
"gzipLength": 23084,
|
|
31
31
|
"brotliLength": 0,
|
|
32
|
-
"mainUid": "
|
|
32
|
+
"mainUid": "6062-127"
|
|
33
33
|
},
|
|
34
|
-
"
|
|
34
|
+
"6062-130": {
|
|
35
35
|
"renderedLength": 1900,
|
|
36
36
|
"gzipLength": 752,
|
|
37
37
|
"brotliLength": 0,
|
|
38
|
-
"mainUid": "
|
|
38
|
+
"mainUid": "6062-129"
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"nodeMetas": {
|
|
42
|
-
"
|
|
42
|
+
"6062-127": {
|
|
43
43
|
"id": "/packages/table-core/build/esm/index.js",
|
|
44
44
|
"moduleParts": {
|
|
45
|
-
"index.production.js": "
|
|
45
|
+
"index.production.js": "6062-128"
|
|
46
46
|
},
|
|
47
47
|
"imported": [],
|
|
48
48
|
"importedBy": [
|
|
49
49
|
{
|
|
50
|
-
"uid": "
|
|
50
|
+
"uid": "6062-129"
|
|
51
51
|
}
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"6062-129": {
|
|
55
55
|
"id": "/packages/react-table/src/index.tsx",
|
|
56
56
|
"moduleParts": {
|
|
57
|
-
"index.production.js": "
|
|
57
|
+
"index.production.js": "6062-130"
|
|
58
58
|
},
|
|
59
59
|
"imported": [
|
|
60
60
|
{
|
|
61
|
-
"uid": "
|
|
61
|
+
"uid": "6062-131"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
"uid": "
|
|
64
|
+
"uid": "6062-127"
|
|
65
65
|
}
|
|
66
66
|
],
|
|
67
67
|
"importedBy": [],
|
|
68
68
|
"isEntry": true
|
|
69
69
|
},
|
|
70
|
-
"
|
|
70
|
+
"6062-131": {
|
|
71
71
|
"id": "react",
|
|
72
72
|
"moduleParts": {},
|
|
73
73
|
"imported": [],
|
|
74
74
|
"importedBy": [
|
|
75
75
|
{
|
|
76
|
-
"uid": "
|
|
76
|
+
"uid": "6062-129"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
79
|
"isExternal": true
|
|
@@ -2219,13 +2219,19 @@
|
|
|
2219
2219
|
const {
|
|
2220
2220
|
rowSelection
|
|
2221
2221
|
} = table.getState();
|
|
2222
|
-
return isRowSelected(row, rowSelection)
|
|
2222
|
+
return isRowSelected(row, rowSelection);
|
|
2223
2223
|
},
|
|
2224
2224
|
getIsSomeSelected: () => {
|
|
2225
2225
|
const {
|
|
2226
2226
|
rowSelection
|
|
2227
2227
|
} = table.getState();
|
|
2228
|
-
return
|
|
2228
|
+
return isSubRowSelected(row, rowSelection) === 'some';
|
|
2229
|
+
},
|
|
2230
|
+
getIsAllSubRowsSelected: () => {
|
|
2231
|
+
const {
|
|
2232
|
+
rowSelection
|
|
2233
|
+
} = table.getState();
|
|
2234
|
+
return isSubRowSelected(row, rowSelection) === 'all';
|
|
2229
2235
|
},
|
|
2230
2236
|
getCanSelect: () => {
|
|
2231
2237
|
var _table$options$enable;
|
|
@@ -2277,6 +2283,10 @@
|
|
|
2277
2283
|
// ) {
|
|
2278
2284
|
|
|
2279
2285
|
if (value) {
|
|
2286
|
+
if (!row.getCanMultiSelect()) {
|
|
2287
|
+
Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key]);
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2280
2290
|
selectedRowIds[id] = true;
|
|
2281
2291
|
} else {
|
|
2282
2292
|
delete selectedRowIds[id];
|
|
@@ -2298,7 +2308,7 @@
|
|
|
2298
2308
|
return rows.map(row => {
|
|
2299
2309
|
var _row$subRows2;
|
|
2300
2310
|
|
|
2301
|
-
const isSelected = isRowSelected(row, rowSelection)
|
|
2311
|
+
const isSelected = isRowSelected(row, rowSelection);
|
|
2302
2312
|
|
|
2303
2313
|
if (isSelected) {
|
|
2304
2314
|
newSelectedFlatRows.push(row);
|
|
@@ -2323,11 +2333,12 @@
|
|
|
2323
2333
|
rowsById: newSelectedRowsById
|
|
2324
2334
|
};
|
|
2325
2335
|
}
|
|
2326
|
-
function isRowSelected(row, selection
|
|
2327
|
-
|
|
2328
|
-
return true;
|
|
2329
|
-
}
|
|
2336
|
+
function isRowSelected(row, selection) {
|
|
2337
|
+
var _selection$row$id;
|
|
2330
2338
|
|
|
2339
|
+
return (_selection$row$id = selection[row.id]) != null ? _selection$row$id : false;
|
|
2340
|
+
}
|
|
2341
|
+
function isSubRowSelected(row, selection, table) {
|
|
2331
2342
|
if (row.subRows && row.subRows.length) {
|
|
2332
2343
|
let allChildrenSelected = true;
|
|
2333
2344
|
let someSelected = false;
|
|
@@ -2343,7 +2354,7 @@
|
|
|
2343
2354
|
allChildrenSelected = false;
|
|
2344
2355
|
}
|
|
2345
2356
|
});
|
|
2346
|
-
return allChildrenSelected ?
|
|
2357
|
+
return allChildrenSelected ? 'all' : someSelected ? 'some' : false;
|
|
2347
2358
|
}
|
|
2348
2359
|
|
|
2349
2360
|
return false;
|
|
@@ -3864,6 +3875,7 @@
|
|
|
3864
3875
|
exports.getSortedRowModel = getSortedRowModel;
|
|
3865
3876
|
exports.isFunction = isFunction;
|
|
3866
3877
|
exports.isRowSelected = isRowSelected;
|
|
3878
|
+
exports.isSubRowSelected = isSubRowSelected;
|
|
3867
3879
|
exports.makeStateUpdater = makeStateUpdater;
|
|
3868
3880
|
exports.memo = memo;
|
|
3869
3881
|
exports.noop = noop;
|