igniteui-angular 21.2.6 → 21.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,7 @@ class IgxComboItemComponent extends IgxDropDownItemComponent {
79
79
  * @hidden
80
80
  */
81
81
  this.itemHeight = '';
82
+ this._disableTransitions = false;
82
83
  }
83
84
  /** @hidden @internal */
84
85
  get _itemHeightToRem() {
@@ -107,14 +108,16 @@ class IgxComboItemComponent extends IgxDropDownItemComponent {
107
108
  * @hidden
108
109
  * @internal
109
110
  */
110
- get disableTransitions() {
111
- return this.comboAPI.disableTransitions;
111
+ ngDoCheck() {
112
+ // Sync state from services once per CD cycle so template bindings return stable field values
113
+ this._selected = !this.isHeader && this.value != null && this.comboAPI.is_item_selected(this.itemID);
114
+ this._disableTransitions = this.comboAPI.disableTransitions;
112
115
  }
113
116
  /**
114
117
  * @hidden
115
118
  */
116
119
  get selected() {
117
- return this.comboAPI.is_item_selected(this.itemID);
120
+ return this._selected;
118
121
  }
119
122
  set selected(value) {
120
123
  if (this.isHeader) {
@@ -122,6 +125,13 @@ class IgxComboItemComponent extends IgxDropDownItemComponent {
122
125
  }
123
126
  this._selected = value;
124
127
  }
128
+ /**
129
+ * @hidden
130
+ * @internal
131
+ */
132
+ get disableTransitions() {
133
+ return this._disableTransitions;
134
+ }
125
135
  /**
126
136
  * @hidden
127
137
  */
@@ -1637,6 +1647,7 @@ class IgxComboDropDownComponent extends IgxDropDownComponent {
1637
1647
  super(...arguments);
1638
1648
  this.combo = inject(IGX_COMBO_COMPONENT);
1639
1649
  this.comboAPI = inject(IgxComboAPIService);
1650
+ this._activeDescendantId = null;
1640
1651
  /** @hidden @internal */
1641
1652
  this.singleMode = false;
1642
1653
  /**
@@ -1670,6 +1681,37 @@ class IgxComboDropDownComponent extends IgxDropDownComponent {
1670
1681
  }
1671
1682
  return null;
1672
1683
  }
1684
+ /**
1685
+ * @hidden @internal
1686
+ */
1687
+ get focusedItem() {
1688
+ return super.focusedItem;
1689
+ }
1690
+ /**
1691
+ * @hidden @internal
1692
+ * Returns a stable aria-activedescendant id, unaffected by virtual scroll position.
1693
+ * The base class computes this from the live focusedItem getter, which reads from the
1694
+ * children QueryList. During virtual scroll the QueryList is recycled, so the getter
1695
+ * can return null mid-CD-cycle causing NG0100 in zoneless apps. The id is cached instead.
1696
+ */
1697
+ get activeDescendant() {
1698
+ return this._activeDescendantId;
1699
+ }
1700
+ /** @hidden @internal */
1701
+ set focusedItem(item) {
1702
+ if (!item) {
1703
+ this._activeDescendantId = null;
1704
+ }
1705
+ else if (item.id !== undefined) {
1706
+ this._activeDescendantId = item.id;
1707
+ }
1708
+ else {
1709
+ // Virtual { value, index } object passed by navigateItem() under virtual scrolling.
1710
+ const resolved = this.children?.find(e => e.index === item.index);
1711
+ this._activeDescendantId = resolved?.id ?? null;
1712
+ }
1713
+ super.focusedItem = item;
1714
+ }
1673
1715
  /**
1674
1716
  * Get all non-header items
1675
1717
  *
@@ -1750,6 +1792,7 @@ class IgxComboDropDownComponent extends IgxDropDownComponent {
1750
1792
  return;
1751
1793
  }
1752
1794
  this.comboAPI.set_selected_item(item.itemID);
1795
+ this._activeDescendantId = item.id ?? null;
1753
1796
  this._focusedItem = item;
1754
1797
  this.combo.setActiveDescendant();
1755
1798
  }