@tanstack/table-core 8.17.3 → 8.19.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/lib/core/cell.js.map +1 -1
- package/build/lib/core/column.js.map +1 -1
- package/build/lib/core/headers.js.map +1 -1
- package/build/lib/core/table.js.map +1 -1
- package/build/lib/filterFns.js.map +1 -1
- package/build/lib/index.esm.js.map +1 -1
- package/build/lib/index.mjs.map +1 -1
- package/build/lib/utils/getFacetedUniqueValues.js.map +1 -1
- package/build/lib/utils/getFilteredRowModel.js.map +1 -1
- package/build/lib/utils/getGroupedRowModel.js.map +1 -1
- package/build/lib/utils/getSortedRowModel.js.map +1 -1
- package/build/lib/utils.js.map +1 -1
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -10
- package/src/filterFns.ts +2 -2
- package/src/utils/getSortedRowModel.ts +2 -2
- package/src/utils.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/table-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.19.1",
|
|
4
4
|
"description": "Headless UI for building powerful tables & datagrids for TS/JS.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,5 @@
|
|
|
43
43
|
"build/umd/*",
|
|
44
44
|
"src"
|
|
45
45
|
],
|
|
46
|
-
"scripts": {
|
|
47
|
-
"clean": "rimraf ./build",
|
|
48
|
-
"test:lib": "vitest",
|
|
49
|
-
"test:lib:dev": "pnpm test:lib --watch",
|
|
50
|
-
"test:types": "tsc --noEmit",
|
|
51
|
-
"build": "pnpm build:rollup && pnpm build:types",
|
|
52
|
-
"build:rollup": "rollup --config rollup.config.mjs",
|
|
53
|
-
"build:types": "tsc --emitDeclarationOnly"
|
|
54
|
-
}
|
|
46
|
+
"scripts": {}
|
|
55
47
|
}
|
package/src/filterFns.ts
CHANGED
|
@@ -69,8 +69,8 @@ const arrIncludesSome: FilterFn<any> = (
|
|
|
69
69
|
columnId: string,
|
|
70
70
|
filterValue: unknown[]
|
|
71
71
|
) => {
|
|
72
|
-
return filterValue.some(
|
|
73
|
-
|
|
72
|
+
return filterValue.some(val =>
|
|
73
|
+
row.getValue<unknown[]>(columnId)?.includes(val)
|
|
74
74
|
)
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -18,8 +18,8 @@ export function getSortedRowModel<TData extends RowData>(): (
|
|
|
18
18
|
const sortedFlatRows: Row<TData>[] = []
|
|
19
19
|
|
|
20
20
|
// Filter out sortings that correspond to non existing columns
|
|
21
|
-
const availableSorting = sortingState.filter(
|
|
22
|
-
|
|
21
|
+
const availableSorting = sortingState.filter(sort =>
|
|
22
|
+
table.getColumn(sort.id)?.getCanSort()
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
const columnInfoById: Record<
|
package/src/utils.ts
CHANGED
|
@@ -65,11 +65,12 @@ type DeepKeysPrefix<
|
|
|
65
65
|
? `${TPrefix}.${DeepKeys<T[TPrefix], [...TDepth, any]> & string}`
|
|
66
66
|
: never
|
|
67
67
|
|
|
68
|
-
export type DeepValue<T, TProp> =
|
|
69
|
-
|
|
70
|
-
?
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
export type DeepValue<T, TProp> =
|
|
69
|
+
T extends Record<string | number, any>
|
|
70
|
+
? TProp extends `${infer TBranch}.${infer TDeepProp}`
|
|
71
|
+
? DeepValue<T[TBranch], TDeepProp>
|
|
72
|
+
: T[TProp & string]
|
|
73
|
+
: never
|
|
73
74
|
|
|
74
75
|
export type NoInfer<T> = [T][T extends any ? 0 : never]
|
|
75
76
|
|