@tanstack/table-core 8.0.3 → 8.0.7
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
3
|
"author": "Tanner Linsley",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.7",
|
|
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/instance.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Column,
|
|
13
13
|
RowModel,
|
|
14
14
|
ColumnDef,
|
|
15
|
+
TableOptions,
|
|
15
16
|
} from '../types'
|
|
16
17
|
|
|
17
18
|
//
|
|
@@ -71,7 +72,10 @@ export type CoreOptions<TGenerics extends TableGenerics> = {
|
|
|
71
72
|
debugRows?: boolean
|
|
72
73
|
initialState?: InitialTableState
|
|
73
74
|
autoResetAll?: boolean
|
|
74
|
-
mergeOptions?:
|
|
75
|
+
mergeOptions?: (
|
|
76
|
+
defaultOptions: TableOptions<TGenerics>,
|
|
77
|
+
options: Partial<TableOptions<TGenerics>>
|
|
78
|
+
) => TableOptions<TGenerics>
|
|
75
79
|
meta?: TGenerics['TableMeta']
|
|
76
80
|
getCoreRowModel: (instance: TableInstance<any>) => () => RowModel<any>
|
|
77
81
|
getSubRows?: (
|
|
@@ -191,7 +195,10 @@ export function createTableInstance<TGenerics extends TableGenerics>(
|
|
|
191
195
|
},
|
|
192
196
|
setOptions: updater => {
|
|
193
197
|
const newOptions = functionalUpdate(updater, instance.options)
|
|
194
|
-
instance.options = mergeOptions(newOptions)
|
|
198
|
+
instance.options = mergeOptions(newOptions) as RequiredKeys<
|
|
199
|
+
TableOptionsResolved<TGenerics>,
|
|
200
|
+
'state'
|
|
201
|
+
>
|
|
195
202
|
},
|
|
196
203
|
_render: (template, props) => {
|
|
197
204
|
if (typeof instance.options.render === 'function') {
|