@tanstack/table-core 8.2.0 → 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/core/column.js.map +1 -1
- package/build/cjs/core/row.js.map +1 -1
- package/build/cjs/utils/getCoreRowModel.js.map +1 -1
- package/build/cjs/utils/getGroupedRowModel.js +1 -1
- package/build/cjs/utils/getGroupedRowModel.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +301 -301
- package/build/types/index.d.ts +2 -2
- package/build/umd/index.development.js +1 -1
- 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/column.ts +1 -1
- package/src/core/row.ts +2 -2
- package/src/utils/getCoreRowModel.ts +1 -1
- package/src/utils/getGroupedRowModel.ts +7 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.2.
|
|
4
|
+
"version": "8.2.1",
|
|
5
5
|
"description": "Headless UI for building powerful tables & datagrids for TS/JS.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/tanstack/table#readme",
|
package/src/core/column.ts
CHANGED
|
@@ -105,7 +105,7 @@ export function createColumn<TData extends RowData, TValue>(
|
|
|
105
105
|
if (resolvedColumnDef.accessorFn) {
|
|
106
106
|
accessorFn = resolvedColumnDef.accessorFn
|
|
107
107
|
} else if (resolvedColumnDef.accessorKey) {
|
|
108
|
-
accessorFn = (originalRow
|
|
108
|
+
accessorFn = (originalRow: TData) =>
|
|
109
109
|
(originalRow as any)[resolvedColumnDef.accessorKey]
|
|
110
110
|
}
|
|
111
111
|
|
package/src/core/row.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { createCell } from './cell'
|
|
|
5
5
|
export type CoreRow<TData extends RowData> = {
|
|
6
6
|
id: string
|
|
7
7
|
index: number
|
|
8
|
-
original
|
|
8
|
+
original: TData
|
|
9
9
|
depth: number
|
|
10
10
|
_valuesCache: Record<string, unknown>
|
|
11
11
|
getValue: <TValue>(columnId: string) => TValue
|
|
@@ -20,7 +20,7 @@ export type CoreRow<TData extends RowData> = {
|
|
|
20
20
|
export const createRow = <TData extends RowData>(
|
|
21
21
|
table: Table<TData>,
|
|
22
22
|
id: string,
|
|
23
|
-
original: TData
|
|
23
|
+
original: TData,
|
|
24
24
|
rowIndex: number,
|
|
25
25
|
depth: number,
|
|
26
26
|
subRows?: Row<TData>[]
|
|
@@ -55,7 +55,13 @@ export function getGroupedRowModel<TData extends RowData>(): (
|
|
|
55
55
|
? flattenBy(groupedRows, row => row.subRows)
|
|
56
56
|
: groupedRows
|
|
57
57
|
|
|
58
|
-
const row = createRow(
|
|
58
|
+
const row = createRow(
|
|
59
|
+
table,
|
|
60
|
+
id,
|
|
61
|
+
leafRows[0]!.original,
|
|
62
|
+
index,
|
|
63
|
+
depth
|
|
64
|
+
)
|
|
59
65
|
|
|
60
66
|
Object.assign(row, {
|
|
61
67
|
groupingColumnId: columnId,
|