Skip to content

UseGridReturn

Since v0.1.0

Return type for useGrid composable.

PropertyTypeDescription
elementRef<DataGridElement<TRow> | unknown>The grid element reference
gridElementRef<DataGridElement<TRow> | unknown>⚠️ The grid element reference.
isReadyRef<boolean>Whether the grid is ready
configRef<GridConfig<TRow, ColumnFieldKey<TRow>> | unknown>Current grid configuration (reactive)
getConfig() => Promise<GridConfig<TRow, ColumnFieldKey<TRow>> | unknown>Get the effective configuration
ready() => Promise<void>Wait for the grid to finish its first render
forceLayout() => Promise<void>Force a layout recalculation
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, ColumnFieldKey<TRow>>[]Get currently visible columns (excluding hidden columns)