Skip to content

Commit 54de322

Browse files
committed
fix(combo): refactor clear when disabled #8200
1 parent 4635792 commit 54de322

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
@@ -1276,13 +1276,14 @@ export class IgxComboComponent extends DisplayDensityBase implements IgxComboBas
12761276
* @hidden @internal
12771277
*/
12781278
public handleClearItems(event: Event): void {
1279-
if (!this.disabled) {
1280-
this.deselectAllItems(true, event);
1281-
if (this.collapsed) {
1282-
this.getEditElement().focus();
1283-
} else {
1284-
this.focusSearchInput(true);
1285-
}
1279+
if (this.disabled) {
1280+
return;
1281+
}
1282+
this.deselectAllItems(true, event);
1283+
if (this.collapsed) {
1284+
this.getEditElement().focus();
1285+
} else {
1286+
this.focusSearchInput(true);
12861287
}
12871288
event.stopPropagation();
12881289
}

0 commit comments

Comments
 (0)