TbwEditor
Structural directive for cell editor rendering.
This provides a cleaner syntax for defining custom cell editors without
the nested <tbw-grid-column-editor> and <ng-template> boilerplate.
<!-- Instead of this verbose syntax: --><tbw-grid-column field="status"> <tbw-grid-column-editor> <ng-template let-value let-onCommit="onCommit" let-onCancel="onCancel"> <app-status-editor [value]="value" (commit)="onCommit($event)" (cancel)="onCancel()" /> </ng-template> </tbw-grid-column-editor></tbw-grid-column>
<!-- Use this cleaner syntax (with auto-wiring - no explicit bindings needed!): --><tbw-grid-column field="status"> <app-status-editor *tbwEditor="let value" [value]="value" /></tbw-grid-column>Template Context
Section titled “Template Context”The structural directive provides the same context as GridColumnEditor:
$implicit/value: The cell valuerow: The full row data objectcolumn: The column configurationonCommit: Callback function to commit the new value (optional - auto-wired if component emitscommitevent)onCancel: Callback function to cancel editing (optional - auto-wired if component emitscancelevent)
Import
Section titled “Import”import { TbwEditor } from '@toolbox-web/grid-angular';
@Component({ imports: [TbwEditor], // ...})Methods
Section titled “Methods”ngOnDestroy()
Section titled “ngOnDestroy()”A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
ngOnDestroy(): voidngTemplateContextGuard()
Section titled “ngTemplateContextGuard()”Static type guard for template context.
Uses any defaults for ergonomic template usage.
ngTemplateContextGuard(dir: TbwEditor, ctx: unknown): ctxParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
dir | TbwEditor | |
ctx | unknown |
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