Skip to content

UseGridReturn

Since v0.1.0

Return type for useGrid composable.

PropertyTypeDescription
gridElementRef<DataGridElement<TRow> | unknown>The grid element reference
isReadyRef<boolean>Whether the grid is ready
configRef<GridConfig<TRow> | unknown>Current grid configuration (reactive)
forceLayout() => Promise<void>Force a layout recalculation
getConfig() => Promise<Readonly<GridConfig<any>>> | undefinedGet current grid configuration
ready() => Promise<void>Wait for grid to be ready
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.
toggleGroup(key: string) => Promise<void>Toggle a group row
registerStyles(id: string, css: string) => voidRegister custom styles via document.adoptedStyleSheets
unregisterStyles(id: string) => voidUnregister previously registered custom styles
getVisibleColumns() => ColumnConfig<TRow>[]Get currently visible columns (excluding hidden 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