Skip to content

Commit ea0ef4e

Browse files
committed
fix(combo): refactor clear when disabled #8200
1 parent 894403a commit ea0ef4e

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
@@ -1324,13 +1324,14 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
13241324
* @hidden @internal
13251325
*/
13261326
public handleClearItems(event: Event): void {
1327-
if (!this.disabled) {
1328-
this.deselectAllItems(true, event);
1329-
if (this.collapsed) {
1330-
this.getEditElement().focus();
1331-
} else {
1332-
this.focusSearchInput(true);
1333-
}
1327+
if (this.disabled) {
1328+
return;
1329+
}
1330+
this.deselectAllItems(true, event);
1331+
if (this.collapsed) {
1332+
this.getEditElement().focus();
1333+
} else {
1334+
this.focusSearchInput(true);
13341335
}
13351336
event.stopPropagation();
13361337
}

0 commit comments

Comments
 (0)