@tanstack/table-core 8.0.0-alpha.14 → 8.0.0-alpha.19

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.0-alpha.14",
4
+ "version": "8.0.0-alpha.19",
5
5
  "description": "Hooks for building lightweight, fast and extendable datagrids for React",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/tanstack/react-table#readme",
@@ -64,7 +64,12 @@ export type Table<TGenerics extends PartialGenerics> = {
64
64
  ) => ColumnDef<TGenerics>
65
65
  createDisplayColumn: (
66
66
  column: PartialKeys<
67
- _NonGenerated<ColumnDef<TGenerics>>,
67
+ Overwrite<
68
+ _NonGenerated<ColumnDef<TGenerics>>, {
69
+ // This is sketchy, but allows the column helper pattern we want.
70
+ // Someone smarter than me could probably do this better.
71
+ columns?: ColumnDef<any>[]
72
+ }>,
68
73
  'accessorFn' | 'accessorKey'
69
74
  >
70
75
  ) => ColumnDef<TGenerics>
@@ -93,7 +98,10 @@ export type Table<TGenerics extends PartialGenerics> = {
93
98
  : never,
94
99
  {
95
100
  accessorFn?: never
96
- accessorKey?: never
101
+ accessorKey?: never,
102
+ // This is sketchy, but allows the column helper pattern we want.
103
+ // Someone smarter than me could probably do this better.
104
+ columns?: ColumnDef<any>[]
97
105
  }
98
106
  >
99
107
  ) => ColumnDef<
@@ -132,15 +132,15 @@ export type FiltersInstance<TGenerics extends PartialGenerics> = {
132
132
 
133
133
  //
134
134
 
135
- export function getDefaultColumn<
136
- TGenerics extends PartialGenerics
137
- >(): FiltersColumnDef<TGenerics> {
138
- return {
139
- filterType: 'auto',
140
- }
141
- }
142
-
143
135
  export const Filters = {
136
+ getDefaultColumn: <
137
+ TGenerics extends PartialGenerics
138
+ >(): FiltersColumnDef<TGenerics> => {
139
+ return {
140
+ filterType: 'auto',
141
+ }
142
+ },
143
+
144
144
  getInitialState: (): FiltersTableState => {
145
145
  return {
146
146
  columnFilters: [],