Private
[___(secret)
Because classes are kind of like interfaces, we need "something" to help TS know what a Resource is.
This isn't a real API, but does help with type inference with the SignatureFrom utility above
This is what ends up calling resize when the browser changes (assuming that the containing element's styles stretch to fill the space)
Later, when container queries are more broadly supported, we'll want to watch the container instead of the window to prevent unneeded updates (as a window can change size without the container changing size)
Private
included in the same file as the plugin due to circular dependency
This goes on the containing element
meta
meta: { column: typeof ColumnMeta; table: typeof TableMeta } = ...Optional state that this plugin may or may not choose to use
columns will each have an instance of meta.column.
the table will have only one instance of meta.table.
name
name: string = 'column-resizing'Unique name for the plugin.
- only one plugin of the same name is allowed
- the name is used for storing preferences / serializable information
Protected
table
Static
features
features: string[] = ...Static
Optional
requires
requires?: string[] Methods
header Cell Modifier
Parameters
- element: HTMLElement
- __namedParameters: ColumnApi
Returns void
reset
Returns void
Static
for Column
- forColumn<T extends BasePlugin<any>>(
this: Constructor<T>,
configFn: () => ColumnOptionsFor<SignatureFrom<T>>,
): [Constructor<T>, () => ColumnOptionsFor<SignatureFrom<T>>]Helper for specifying column-level configurations for a plugin on headlessTable
's
columns option
Type Parameters
- T extends BasePlugin<any>
Returns [Constructor<T>, () => ColumnOptionsFor<SignatureFrom<T>>]
Static
with
- with<T extends BasePlugin<any>>(
this: Constructor<T>,
configFn: () => OptionsFor<SignatureFrom<T>>,
): [Constructor<T>, () => OptionsFor<SignatureFrom<T>>]Helper for specifying plugins on headlessTable
with the plugin-level options
Type Parameters
- T extends BasePlugin<any>
Returns [Constructor<T>, () => OptionsFor<SignatureFrom<T>>]
One instance of a plugin exists per table but a plugin can have a "Meta" for each column