@tanstack/table-core 8.10.3 → 8.10.5
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/lib/core/row.js +1 -1
- package/build/lib/core/row.js.map +1 -1
- package/build/lib/index.esm.js +4 -2
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs +4 -2
- package/build/lib/index.mjs.map +1 -1
- package/build/lib/utils/getSortedRowModel.js +3 -1
- package/build/lib/utils/getSortedRowModel.js.map +1 -1
- package/build/umd/index.development.js +4 -2
- 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 +1 -1
- package/src/core/row.ts +1 -1
- package/src/utils/getSortedRowModel.ts +1 -1
package/build/lib/index.mjs
CHANGED
|
@@ -2978,7 +2978,7 @@ const createRow = (table, id, original, rowIndex, depth, subRows, parentId) => {
|
|
|
2978
2978
|
},
|
|
2979
2979
|
subRows: subRows != null ? subRows : [],
|
|
2980
2980
|
getLeafRows: () => flattenBy(row.subRows, d => d.subRows),
|
|
2981
|
-
getParentRow: () => row.parentId ? table.getRow(row.parentId) : undefined,
|
|
2981
|
+
getParentRow: () => row.parentId ? table.getRow(row.parentId, true) : undefined,
|
|
2982
2982
|
getParentRows: () => {
|
|
2983
2983
|
let parentRows = [];
|
|
2984
2984
|
let currentRow = row;
|
|
@@ -3448,7 +3448,9 @@ function getSortedRowModel() {
|
|
|
3448
3448
|
const sortData = rows => {
|
|
3449
3449
|
// This will also perform a stable sorting using the row index
|
|
3450
3450
|
// if needed.
|
|
3451
|
-
const sortedData =
|
|
3451
|
+
const sortedData = rows.map(row => ({
|
|
3452
|
+
...row
|
|
3453
|
+
}));
|
|
3452
3454
|
sortedData.sort((rowA, rowB) => {
|
|
3453
3455
|
for (let i = 0; i < availableSorting.length; i += 1) {
|
|
3454
3456
|
var _sortEntry$desc;
|