Skip to content

Commit 7965d9a

Browse files
committed
fix(combo): refactor clear when disabled #8200
1 parent 0af641b commit 7965d9a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

projects/igniteui-angular/src/lib/combo/combo.component.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,13 +1316,14 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
13161316
* @hidden @internal
13171317
*/
13181318
public handleClearItems(event: Event): void {
1319-
if (!this.disabled) {
1320-
this.deselectAllItems(true, event);
1321-
if (this.collapsed) {
1322-
this.getEditElement().focus();
1323-
} else {
1324-
this.focusSearchInput(true);
1325-
}
1319+
if (this.disabled) {
1320+
return;
1321+
}
1322+
this.deselectAllItems(true, event);
1323+
if (this.collapsed) {
1324+
this.getEditElement().focus();
1325+
} else {
1326+
this.focusSearchInput(true);
13261327
}
13271328
event.stopPropagation();
13281329
}

0 commit comments

Comments
 (0)