@tanstack/react-table 8.1.3 → 8.2.1
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.map +1 -1
- package/build/cjs/table-core/build/esm/index.js +6 -8
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +6 -8
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +18 -18
- package/build/umd/index.development.js +6 -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/src/index.tsx +10 -6
package/build/esm/index.js
CHANGED
|
@@ -25,9 +25,9 @@ function functionalUpdate(updater, input) {
|
|
|
25
25
|
}
|
|
26
26
|
function noop() {//
|
|
27
27
|
}
|
|
28
|
-
function makeStateUpdater(key,
|
|
28
|
+
function makeStateUpdater(key, instance) {
|
|
29
29
|
return updater => {
|
|
30
|
-
|
|
30
|
+
instance.setState(old => {
|
|
31
31
|
return { ...old,
|
|
32
32
|
[key]: functionalUpdate(updater, old[key])
|
|
33
33
|
};
|
|
@@ -2891,9 +2891,9 @@ function createTable(options) {
|
|
|
2891
2891
|
header: props => props.header.column.id,
|
|
2892
2892
|
footer: props => props.header.column.id,
|
|
2893
2893
|
cell: props => {
|
|
2894
|
-
var
|
|
2894
|
+
var _props$renderValue$to, _props$renderValue;
|
|
2895
2895
|
|
|
2896
|
-
return (
|
|
2896
|
+
return (_props$renderValue$to = (_props$renderValue = props.renderValue()) == null ? void 0 : _props$renderValue.toString == null ? void 0 : _props$renderValue.toString()) != null ? _props$renderValue$to : null;
|
|
2897
2897
|
},
|
|
2898
2898
|
...table._features.reduce((obj, feature) => {
|
|
2899
2899
|
return Object.assign(obj, feature.getDefaultColumnDef == null ? void 0 : feature.getDefaultColumnDef());
|
|
@@ -3423,9 +3423,7 @@ function getFacetedMinMaxValues() {
|
|
|
3423
3423
|
let facetedMinMaxValues = [firstValue, firstValue];
|
|
3424
3424
|
|
|
3425
3425
|
for (let i = 0; i < facetedRowModel.flatRows.length; i++) {
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
const value = (_facetedRowModel$flat2 = facetedRowModel.flatRows[i]) == null ? void 0 : _facetedRowModel$flat2.getValue(columnId);
|
|
3426
|
+
const value = facetedRowModel.flatRows[i].getValue(columnId);
|
|
3429
3427
|
|
|
3430
3428
|
if (value < facetedMinMaxValues[0]) {
|
|
3431
3429
|
facetedMinMaxValues[0] = value;
|
|
@@ -3575,7 +3573,7 @@ function getGroupedRowModel() {
|
|
|
3575
3573
|
const subRows = groupUpRecursively(groupedRows, depth + 1, id); // Flatten the leaf rows of the rows in this group
|
|
3576
3574
|
|
|
3577
3575
|
const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;
|
|
3578
|
-
const row = createRow(table, id,
|
|
3576
|
+
const row = createRow(table, id, leafRows[0].original, index, depth);
|
|
3579
3577
|
Object.assign(row, {
|
|
3580
3578
|
groupingColumnId: columnId,
|
|
3581
3579
|
groupingValue,
|