Skip to main content
cngx-src documentation

CngxDgaRowError

Directivev0.1.0WCAG AA

projects/ui/data-grid-accordion/data-grid-row-error.directive.ts

Import#

import { CngxDgaRowError } from '@cngx/ui/data-grid-accordion'

Description#

Structural slot for a CngxDataGridRow's error state. The row renders it inside the detail region, in a role="alert" container, when the row's [state] is error - so the error body is announced to assistive tech the moment it appears, even if the row was never expanded. Absent, the row renders a minimal CSS error affordance with the resolved errorMessage.

The template receives a CngxDgaRowStateContext whose message is the resolved error string, so the override can render the announced text (and a retry) without re-deriving it.

<cngx-dga-row [state]="report.status()">
  <span cngxDgaCell primary>Report</span>
  <ng-template cngxDgaRowError let-message="message">
    {{ message }} <button type="button" (click)="retry()">Retry</button>
  </ng-template>
</cngx-dga-row>

Metadata#

Dependencies#

TemplateRefinject()templateRef

Index#

Methods#

ngTemplateContextGuard#CngxDgaRowStateContext
Static
ngTemplateContextGuard(_dir: CngxDgaRowError, ctx: unknown)
@param_dirCngxDgaRowError
@paramctxunknown