@@ -17,6 +17,8 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
1717 public combo = inject < IgxComboBase > ( IGX_COMBO_COMPONENT ) ;
1818 protected comboAPI = inject ( IgxComboAPIService ) ;
1919
20+ private _activeDescendantId : string | null = null ;
21+
2022 /** @hidden @internal */
2123 @Input ( { transform : booleanAttribute } )
2224 public singleMode = false ;
@@ -54,6 +56,40 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
5456 return null ;
5557 }
5658
59+ /**
60+ * @hidden @internal
61+ */
62+ public override get focusedItem ( ) : IgxDropDownItemBaseDirective {
63+ return super . focusedItem ;
64+ }
65+
66+ /**
67+ * @hidden @internal
68+ * Returns a stable aria-activedescendant id, unaffected by virtual scroll position.
69+ * The base class computes this from the live focusedItem getter, which reads from the
70+ * children QueryList. During virtual scroll the QueryList is recycled, so the getter
71+ * can return null mid-CD-cycle causing NG0100 in zoneless apps. The id is cached instead.
72+ */
73+ public override get activeDescendant ( ) : string | null {
74+ return this . _activeDescendantId ;
75+ }
76+
77+ /** @hidden @internal */
78+ public override set focusedItem ( item : IgxDropDownItemBaseDirective ) {
79+ if ( ! item ) {
80+ this . _activeDescendantId = null ;
81+ } else if ( item . id !== undefined ) {
82+ this . _activeDescendantId = item . id ;
83+ } else {
84+ // Virtual { value, index } object passed by navigateItem() under virtual scrolling.
85+ const resolved = this . children ?. find ( e => e . index === item . index ) ;
86+ if ( resolved ) {
87+ this . _activeDescendantId = resolved . id ;
88+ }
89+ }
90+ super . focusedItem = item ;
91+ }
92+
5793 /**
5894 * Get all non-header items
5995 *
@@ -141,6 +177,7 @@ export class IgxComboDropDownComponent extends IgxDropDownComponent implements I
141177 return ;
142178 }
143179 this . comboAPI . set_selected_item ( item . itemID ) ;
180+ this . _activeDescendantId = item . id ;
144181 this . _focusedItem = item ;
145182 this . combo . setActiveDescendant ( ) ;
146183 }
0 commit comments