useGrid
Composable for programmatic access to the grid.
useGrid(selector: string): UseGridReturn<TRow>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
selector | string | Optional CSS selector to target a specific grid element via |
| DOM query instead of using Vue’s provide/inject. Use when the component | ||
contains multiple grids, e.g. 'tbw-grid.primary' or '#my-grid'. |
Example
Section titled “Example”<script setup>import { useGrid } from '@toolbox-web/grid-vue';
const { forceLayout, getConfig, isReady, getVisibleColumns } = useGrid();
async function handleResize() { await forceLayout();}</script>
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