Skip to content

Commit 676ac89

Browse files
committed
fix(igx-combo): rebind onArrowUp to searchInput,for overlay integration, #1260
1 parent 514e75e commit 676ac89

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
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
@@ -32,7 +32,7 @@
3232
<igx-combo-drop-down #igxComboDropDown class="igx-combo__drop-down" [width]="width">
3333
<igx-input-group class="igx-combo__search">
3434
<input class="igx-combo-input" igxInput #searchInput name="searchInput" type="text" [(ngModel)]="searchValue" (ngModelChange)="handleInputChange($event)"
35-
(keyup)="handleKeyUp($event)" (focus)="dropdown.onBlur($event)" [placeholder]="searchPlaceholder" aria-autocomplete="both"
35+
(keyup)="handleKeyUp($event)" (keydown)="handleKeyDown($event)" (focus)="dropdown.onBlur($event)" [placeholder]="searchPlaceholder" aria-autocomplete="both"
3636
[attr.aria-owns]="dropdown.id" [attr.aria-labelledby]="ariaLabelledBy" />
3737
</igx-input-group>
3838
<ng-container *ngTemplateOutlet="headerTemplate; context: {$implicit: this}">

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
549549
/**
550550
* @hidden
551551
*/
552-
@HostListener('keydown.ArrowUp', ['$event'])
553-
@HostListener('keydown.Alt.ArrowUp', ['$event'])
552+
// @HostListener('keydown.ArrowUp', ['$event'])
553+
// @HostListener('keydown.Alt.ArrowUp', ['$event'])
554554
onArrowUp(evt) {
555555
evt.preventDefault();
556556
evt.stopPropagation();
@@ -701,6 +701,15 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
701701
}
702702
}
703703

704+
/**
705+
* @hidden
706+
*/
707+
public handleKeyDown(evt) {
708+
if (evt.key === 'ArrowUp' || evt.key === 'Up') {
709+
this.onArrowUp(evt);
710+
}
711+
}
712+
704713
private checkMatch() {
705714
this.customValueFlag = this.displayKey || this.displayKey === 0 ?
706715
!this.filteredData

0 commit comments

Comments
 (0)