@@ -236,7 +236,7 @@ export class GridRow {
236236 '[attr.id]' : '_pattern.id()' ,
237237 '[attr.rowspan]' : '_pattern.rowSpan()' ,
238238 '[attr.colspan]' : '_pattern.colSpan()' ,
239- '[attr.data-active]' : '_pattern. active()' ,
239+ '[attr.data-active]' : 'active()' ,
240240 '[attr.data-anchor]' : '_pattern.anchor()' ,
241241 '[attr.aria-disabled]' : '_pattern.disabled()' ,
242242 '[attr.aria-rowspan]' : '_pattern.rowSpan()' ,
@@ -254,6 +254,9 @@ export class GridCell {
254254 /** A reference to the host element. */
255255 readonly element = this . _elementRef . nativeElement as HTMLElement ;
256256
257+ /** Whether the cell is currently active (focused). */
258+ readonly active = computed ( ( ) => this . _pattern . active ( ) ) ;
259+
257260 /** The widgets contained within this cell, if any. */
258261 private readonly _widgets = contentChildren ( GridCellWidget , { descendants : true } ) ;
259262
@@ -362,7 +365,7 @@ export class GridCell {
362365 exportAs : 'ngGridCellWidget' ,
363366 host : {
364367 'class' : 'grid-cell-widget' ,
365- '[attr.data-active]' : '_pattern. active()' ,
368+ '[attr.data-active]' : 'active()' ,
366369 '[attr.data-active-control]' : 'isActivated() ? "widget" : "cell"' ,
367370 '[tabindex]' : '_tabIndex()' ,
368371 } ,
@@ -374,6 +377,9 @@ export class GridCellWidget {
374377 /** A reference to the host element. */
375378 readonly element = this . _elementRef . nativeElement as HTMLElement ;
376379
380+ /** Whether the widget is currently active (focused). */
381+ readonly active = computed ( ( ) => this . _pattern . active ( ) ) ;
382+
377383 /** The parent cell. */
378384 private readonly _cell = inject ( GridCell ) ;
379385
0 commit comments