@@ -74,10 +74,10 @@ export class GridCellWidget {
7474 readonly focusTarget = input < ElementRef | HTMLElement | undefined > ( ) ;
7575
7676 /** Emits when the widget is activated. */
77- readonly onActivate = output < KeyboardEvent | FocusEvent | undefined > ( ) ;
77+ readonly activated = output < KeyboardEvent | FocusEvent | undefined > ( ) ;
7878
7979 /** Emits when the widget is deactivated. */
80- readonly onDeactivate = output < KeyboardEvent | FocusEvent | undefined > ( ) ;
80+ readonly deactivated = output < KeyboardEvent | FocusEvent | undefined > ( ) ;
8181
8282 /** The tabindex override. */
8383 readonly tabindex = input < number | undefined > ( ) ;
@@ -96,10 +96,8 @@ export class GridCellWidget {
9696 element : ( ) => this . element ,
9797 cell : ( ) => this . _cell . _pattern ,
9898 focusTarget : computed ( ( ) => {
99- if ( this . focusTarget ( ) instanceof ElementRef ) {
100- return ( this . focusTarget ( ) as ElementRef ) . nativeElement ;
101- }
102- return this . focusTarget ( ) ;
99+ const target = this . focusTarget ( ) ;
100+ return target instanceof ElementRef ? target . nativeElement : target ;
103101 } ) ,
104102 } ) ;
105103
@@ -112,14 +110,14 @@ export class GridCellWidget {
112110 afterRenderEffect ( ( ) => {
113111 const activateEvent = this . _pattern . lastActivateEvent ( ) ;
114112 if ( activateEvent ) {
115- this . onActivate . emit ( activateEvent ) ;
113+ this . activated . emit ( activateEvent ) ;
116114 }
117115 } ) ;
118116
119117 afterRenderEffect ( ( ) => {
120118 const deactivateEvent = this . _pattern . lastDeactivateEvent ( ) ;
121119 if ( deactivateEvent ) {
122- this . onDeactivate . emit ( deactivateEvent ) ;
120+ this . deactivated . emit ( deactivateEvent ) ;
123121 }
124122 } ) ;
125123 }
0 commit comments