CellRenderer
Vue render function or component for cell rendering.
Can be either:
- A render function receiving
CellRenderContextand returning aVNode - A Vue component (SFC or defineComponent)
type CellRenderer = (ctx: CellRenderContext<TRow, TValue>) => VNode | ComponentExample
Section titled “Example”import type { CellRenderer, ColumnConfig } from '@toolbox-web/grid-vue';import StatusBadge from './StatusBadge.vue';
// As render functionconst statusRenderer: CellRenderer<Employee, string> = (ctx) => h('span', { class: ctx.value }, ctx.value);
// As Vue componentconst columns: ColumnConfig<Employee>[] = [ { field: 'status', renderer: StatusBadge },];
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