Skip to content

CellRenderer

Since v0.11.0

Interface for cell renderer components.

Renderer components receive the cell value, row data, and column config as inputs. Use Angular signal inputs for reactive updates.

import { Component, input } from '@angular/core';
import type { CellRenderer } from '@toolbox-web/grid-angular';
@Component({
selector: 'app-status-badge',
template: `<span [class]="'badge-' + value()">{{ value() }}</span>`
})
export class StatusBadgeComponent implements CellRenderer<Employee, string> {
value = input.required<string>();
row = input.required<Employee>();
column = input<unknown>();
}
PropertyTypeDescription
value() => TValue | undefinedThe cell value - use input<TValue>() or input.required<TValue>()
row() => TRow | undefinedThe full row data - use input<TRow>() or input.required<TRow>()
column?() => unknownThe column configuration (optional) - use input<unknown>()
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt