Skip to content

TypeDefault

Type default configuration.

Allows Angular component classes for renderers and editors in typeDefaults.

import type { GridConfig, TypeDefault } from '@toolbox-web/grid-angular';
const config: GridConfig<Employee> = {
typeDefaults: {
boolean: {
renderer: (ctx) => { ... }, // vanilla JS renderer
editor: CheckboxEditorComponent, // Angular component
},
date: {
editor: DatePickerComponent, // Angular component
}
}
};
PropertyTypeDescription
format?(value: unknown, row: TRow) => stringFormat function for cell display
renderer?ColumnViewRenderer<TRow, any> | Type<CellRenderer<TRow, unknown>>Cell renderer - can be vanilla JS function or Angular component
editor?ColumnEditorSpec<TRow, any> | Type<CellEditor<TRow, unknown>>Cell editor - can be vanilla JS function or Angular component
editorParams?Record<string, unknown>Default editor parameters
filterPanelRenderer?FilterPanelRenderer | Type<FilterPanel>Custom filter panel renderer for this type. Requires FilteringPlugin.

Custom filter panel renderer for this type. Requires FilteringPlugin.

Can be:

  • A vanilla FilterPanelRenderer function (container, params) => void
  • An Angular component class implementing FilterPanel
typeDefaults: {
date: {
filterPanelRenderer: DateFilterPanelComponent,
}
}

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