@tanstack/table-core 8.0.0-alpha.21 → 8.0.0-alpha.22
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/features/Pinning.js +6 -0
- package/build/cjs/features/Pinning.js.map +1 -1
- package/build/esm/index.js +6 -0
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +250 -250
- package/build/types/features/Pinning.d.ts +1 -0
- package/build/umd/index.development.js +6 -0
- 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/features/Pinning.ts +7 -0
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.
|
|
4
|
+
"version": "8.0.0-alpha.22",
|
|
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",
|
package/src/features/Pinning.ts
CHANGED
|
@@ -47,6 +47,7 @@ export type ColumnPinningInstance<TGenerics extends PartialGenerics> = {
|
|
|
47
47
|
getColumnCanPin: (columnId: string) => boolean
|
|
48
48
|
getColumnIsPinned: (columnId: string) => ColumnPinningPosition
|
|
49
49
|
getColumnPinnedIndex: (columnId: string) => number
|
|
50
|
+
getIsSomeColumnsPinned: () => boolean
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
//
|
|
@@ -173,6 +174,12 @@ export const Pinning = {
|
|
|
173
174
|
-1
|
|
174
175
|
: 0
|
|
175
176
|
},
|
|
177
|
+
|
|
178
|
+
getIsSomeColumnsPinned: () => {
|
|
179
|
+
const { left, right } = instance.getState().columnPinning
|
|
180
|
+
|
|
181
|
+
return Boolean(left?.length || right?.length)
|
|
182
|
+
},
|
|
176
183
|
}
|
|
177
184
|
},
|
|
178
185
|
}
|