Skip to content

UseGridReturn

Since v0.0.1

Return type for useGrid hook.

PropertyTypeDescription
refRefObject<DataGridRef<TRow> | unknown>Ref to attach to the DataGrid component (returns DataGridRef handle)
elementDataGridElement<TRow> | unknownDirect access to the typed grid element (convenience for ref.current?.element)
isReadybooleanWhether the grid is ready
configGridConfig<TRow> | unknownCurrent 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 | undefinedGet a plugin by its class
getPluginByName(name: K) => unknown | undefinedGet a plugin by its registered name (preferred). Uses the type-safe PluginNameMap for auto-completion and return type narrowing.
registerStyles(id: string, css: string) => voidRegister custom styles
unregisterStyles(id: string) => voidUnregister 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