Skip to content
Source
Sign inSign up
TanStack/table

fix(table-core): give TableFeature hooks an all-features table type #6597

Opensorena-paydar(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/6597/headopened

Showing 11 changed files with 9 additions and 12 deletions (loading 8).

x
0 of 11 viewed, 11 left
5 additions and 0 deletions.changeset/plain-plugins-type.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/table-core': patch
+---
+​
+Publish `Table_All` and give `TableFeature` hooks that table type, so custom features can read their own options and state without casting `table.options`
2 additions and 6 deletionsdocs/framework/alpine/guide/custom-features.mdModified
View file
@@ -288,9 +288,7 @@
const newState = functionalUpdate(updater, old)
return newState
- return (table.options as TableOptions_Density).onDensityChange?.(
- safeUpdater,
- )
+ return table.options.onDensityChange?.(safeUpdater)
table_toggleDensity: {
@@ -299,9 +297,7 @@
if (value) return value
return old === 'lg' ? 'md' : old === 'md' ? 'sm' : 'lg'
- return (table.options as TableOptions_Density).onDensityChange?.(
- safeUpdater,
- )
+ return table.options.onDensityChange?.(safeUpdater)