Skip to content

Commit 6f91b3e

Browse files
committed
feat(igx-combo): add type, used by the input group. #1260
1 parent 53cb0a1 commit 6f91b3e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</ng-template>
1616

1717
<div class="igx-combo" [style.width]="width" role="combobox" [attr.aria-expanded]="!dropdown.collapsed" aria-haspopup="listbox" [attr.aria-owns]="dropdown.id">
18-
<igx-input-group type="box" (click)="onInputClick($event)">
18+
<igx-input-group [type]="type" (click)="onInputClick($event)">
1919
<input igxInput #comboInput name="comboInput" type="text" [(ngModel)]="value" width="90%" readonly [placeholder]="placeholder" [disabled]="disabled" />
2020
<igx-suffix igxButton="icon" class="clearButton" igxRipple (click)="handleClearItems($event)">
2121
<igx-icon *ngIf="value.length" fontSet="material" name="clear"></igx-icon>

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
543543
@Input()
544544
public disabled = false;
545545

546+
@Input()
547+
public type = 'box';
548+
546549
@HostListener('keydown.ArrowDown', ['$event'])
547550
@HostListener('keydown.Alt.ArrowDown', ['$event'])
548551
onArrowDown(evt) {
@@ -1012,6 +1015,14 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
10121015
};
10131016
}
10141017

1018+
/**
1019+
* @hidden
1020+
*/
1021+
public handleClearItems(event) {
1022+
this.deselectAllItems(true);
1023+
event.stopPropagation();
1024+
}
1025+
10151026
public toggle() {
10161027
this.searchValue = '';
10171028
this.dropdown.toggle(this.overlaySettings);
@@ -1060,11 +1071,6 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
10601071
this.selectionAPI.deselect_items(this.id, this.selectionAPI.get_all_ids(this.filteredData));
10611072
this.triggerSelectionChange(newSelection);
10621073
}
1063-
1064-
public handleClearItems(event) {
1065-
this.deselectAllItems(true);
1066-
event.stopPropagation();
1067-
}
10681074
}
10691075

10701076
@NgModule({

0 commit comments

Comments
 (0)