@tanstack/svelte-table 8.2.3 → 8.2.6
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 +18 -7
- package/build/cjs/table-core/build/esm/index.js.map +1 -1
- package/build/esm/index.js +18 -7
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +47 -47
- package/build/umd/index.development.js +18 -7
- 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/esm/index.js
CHANGED
|
@@ -962,7 +962,7 @@ const Expanding = {
|
|
|
962
962
|
getCanExpand: () => {
|
|
963
963
|
var _table$options$getRow, _table$options$enable, _row$subRows;
|
|
964
964
|
|
|
965
|
-
return (
|
|
965
|
+
return (_table$options$getRow = table.options.getRowCanExpand == null ? void 0 : table.options.getRowCanExpand(row)) != null ? _table$options$getRow : ((_table$options$enable = table.options.enableExpanding) != null ? _table$options$enable : true) && !!((_row$subRows = row.subRows) != null && _row$subRows.length);
|
|
966
966
|
},
|
|
967
967
|
getToggleExpandedHandler: () => {
|
|
968
968
|
const canExpand = row.getCanExpand();
|
|
@@ -1108,7 +1108,7 @@ const Filters = {
|
|
|
1108
1108
|
var _table$getCoreRowMode, _table$getCoreRowMode2;
|
|
1109
1109
|
|
|
1110
1110
|
const value = (_table$getCoreRowMode = table.getCoreRowModel().flatRows[0]) == null ? void 0 : (_table$getCoreRowMode2 = _table$getCoreRowMode._getAllCellsByColumnId()[column.id]) == null ? void 0 : _table$getCoreRowMode2.getValue();
|
|
1111
|
-
return typeof value === 'string';
|
|
1111
|
+
return typeof value === 'string' || typeof value === 'number';
|
|
1112
1112
|
}
|
|
1113
1113
|
};
|
|
1114
1114
|
},
|
|
@@ -2259,8 +2259,8 @@ const RowSelection = {
|
|
|
2259
2259
|
const mutateRowIsSelected = (selectedRowIds, id, value, table) => {
|
|
2260
2260
|
var _row$subRows;
|
|
2261
2261
|
|
|
2262
|
-
const row = table.getRow(id);
|
|
2263
|
-
|
|
2262
|
+
const row = table.getRow(id); // const isGrouped = row.getIsGrouped()
|
|
2263
|
+
// if ( // TODO: enforce grouping row selection rules
|
|
2264
2264
|
// !isGrouped ||
|
|
2265
2265
|
// (isGrouped && table.options.enableGroupingRowSelection)
|
|
2266
2266
|
// ) {
|
|
@@ -3575,9 +3575,20 @@ function getGroupedRowModel() {
|
|
|
3575
3575
|
depth = 0;
|
|
3576
3576
|
}
|
|
3577
3577
|
|
|
3578
|
-
//
|
|
3579
|
-
|
|
3580
|
-
|
|
3578
|
+
// Grouping depth has been been met
|
|
3579
|
+
// Stop grouping and simply rewrite thd depth and row relationships
|
|
3580
|
+
if (depth >= existingGrouping.length) {
|
|
3581
|
+
return rows.map(row => {
|
|
3582
|
+
row.depth = depth;
|
|
3583
|
+
groupedFlatRows.push(row);
|
|
3584
|
+
groupedRowsById[row.id] = row;
|
|
3585
|
+
|
|
3586
|
+
if (row.subRows) {
|
|
3587
|
+
row.subRows = groupUpRecursively(row.subRows, depth + 1);
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
return row;
|
|
3591
|
+
});
|
|
3581
3592
|
}
|
|
3582
3593
|
|
|
3583
3594
|
const columnId = existingGrouping[depth]; // Group the rows together for this level
|