UseGridReturn
Since v0.0.1
Return type for useGrid hook.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
ref | RefObject<DataGridRef<TRow> | unknown> | Ref to attach to the DataGrid component (returns DataGridRef handle) |
element | DataGridElement<TRow> | unknown | Direct access to the typed grid element (convenience for ref.current?.element) |
isReady | boolean | Whether the grid is ready |
config | GridConfig<TRow> | unknown | Current grid configuration |
getConfig | () => Promise<GridConfig<TRow> | unknown> | Get the effective configuration |
forceLayout | () => Promise<void> | Force a layout recalculation |
toggleGroup | (key: string) => Promise<void> | Toggle a group row |
getPlugin | (pluginClass: (args: unknown[]) => T) => T | undefined | Get a plugin by its class |
getPluginByName | (name: K) => unknown | undefined | Get a plugin by its registered name (preferred). Uses the type-safe PluginNameMap for auto-completion and return type narrowing. |
registerStyles | (id: string, css: string) => void | Register custom styles |
unregisterStyles | (id: string) => void | Unregister custom styles |
getVisibleColumns | () => ColumnConfig<TRow>[] | Get current visible columns |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt