TypeDefault
Type default configuration for React applications.
Defines default renderer, editor, and editorParams for a data type using React function components.
Example
Section titled “Example”import type { TypeDefault } from '@toolbox-web/grid-react';
const countryDefault: TypeDefault<Employee, string> = { renderer: (ctx) => <CountryFlag code={ctx.value} />, editor: (ctx) => ( <CountrySelect value={ctx.value} onSelect={ctx.commit} /> ),};Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
renderer? | (ctx: CellRenderContext<TRow, TValue>) => ReactNode | React component/function for rendering cells of this type |
editor? | (ctx: ColumnEditorContext<TRow, TValue>) => ReactNode | React component/function for editing cells of this type |
editorParams? | Record<string, unknown> | Default editorParams for this type |
filterPanelRenderer? | (params: FilterPanelParams) => ReactNode | Custom filter panel renderer for this type. Requires FilteringPlugin. |
Property Details
Section titled “Property Details”filterPanelRenderer
Section titled “filterPanelRenderer”Custom filter panel renderer for this type. Requires FilteringPlugin.
Returns JSX to render as the custom filter panel content. The rendered content is mounted into the filter panel container.
filterPanelRenderer: (params) => ( <MyFilterPanel field={params.field} uniqueValues={params.uniqueValues} onApply={(values) => params.applySetFilter(values)} onClear={params.clearFilter} />)
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