Skip to content

Commit

Permalink
feat(*): no emitted event on dd when change selected through API #14188
Browse files Browse the repository at this point in the history
  • Loading branch information
ddincheva committed Jun 10, 2024
1 parent 450cb2c commit 7a8b805
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let NEXT_ID = 0;
selector: '[igxDropDownItemBase]',
standalone: true
})
export class IgxDropDownItemBaseDirective implements DoCheck {
export class IgxDropDownItemBaseDirective {
/**
* Sets/gets the `id` of the item.
* ```html
Expand Down Expand Up @@ -283,19 +283,6 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
}
}

public ngDoCheck(): void {
if (this._selected) {
const dropDownSelectedItem = this.dropDown.selectedItem;
if (!dropDownSelectedItem) {
this.dropDown.selectItem(this);
} else if (this.hasIndex
? this._index !== dropDownSelectedItem.index || this.value !== dropDownSelectedItem.value :
this !== dropDownSelectedItem) {
this.dropDown.selectItem(this);
}
}
}

/** Returns true if the items is not a header or disabled */
protected get isSelectable(): boolean {
return !(this.disabled || this.isHeader);
Expand Down

0 comments on commit 7a8b805

Please sign in to comment.