Skip to content

GridDetailView

Directive that captures an <ng-template> for use as a master-detail row renderer.

This enables declarative Angular component usage for expandable detail rows that appear below the main row when expanded.

<tbw-grid [rows]="rows" [gridConfig]="config">
<tbw-grid-detail [showExpandColumn]="true" animation="slide">
<ng-template let-row>
<app-detail-panel [employee]="row" />
</ng-template>
</tbw-grid-detail>
</tbw-grid>

The template context provides:

  • $implicit / row: The full row data object

Import the directive in your component:

import { GridDetailView } from '@toolbox-web/grid-angular';
@Component({
imports: [GridDetailView],
// ...
})
PropertyTypeDescription
showExpandColumnInputSignal<boolean>Whether to show the expand/collapse column. Default: true
animationInputSignal<ExpandCollapseAnimation>Animation style for expand/collapse. Default: ‘slide’
templateSignal<TemplateRef<any> | undefined>Query for the ng-template content child.

Static type guard for template context. Enables type inference in templates.

ngTemplateContextGuard(dir: GridDetailView, ctx: unknown): ctx
NameTypeDescription
dirGridDetailView
ctxunknown

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