Skip to content

Commit

Permalink
fix(igx-combo): rebind onArrowUp to searchInput,for overlay integrati…
Browse files Browse the repository at this point in the history
…on, #1260
  • Loading branch information
ViktorSlavov committed Jun 22, 2018
1 parent 514e75e commit 676ac89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<igx-combo-drop-down #igxComboDropDown class="igx-combo__drop-down" [width]="width">
<igx-input-group class="igx-combo__search">
<input class="igx-combo-input" igxInput #searchInput name="searchInput" type="text" [(ngModel)]="searchValue" (ngModelChange)="handleInputChange($event)"
(keyup)="handleKeyUp($event)" (focus)="dropdown.onBlur($event)" [placeholder]="searchPlaceholder" aria-autocomplete="both"
(keyup)="handleKeyUp($event)" (keydown)="handleKeyDown($event)" (focus)="dropdown.onBlur($event)" [placeholder]="searchPlaceholder" aria-autocomplete="both"
[attr.aria-owns]="dropdown.id" [attr.aria-labelledby]="ariaLabelledBy" />
</igx-input-group>
<ng-container *ngTemplateOutlet="headerTemplate; context: {$implicit: this}">
Expand Down
13 changes: 11 additions & 2 deletions projects/igniteui-angular/src/lib/combo/combo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
/**
* @hidden
*/
@HostListener('keydown.ArrowUp', ['$event'])
@HostListener('keydown.Alt.ArrowUp', ['$event'])
// @HostListener('keydown.ArrowUp', ['$event'])
// @HostListener('keydown.Alt.ArrowUp', ['$event'])
onArrowUp(evt) {
evt.preventDefault();
evt.stopPropagation();
Expand Down Expand Up @@ -701,6 +701,15 @@ export class IgxComboComponent implements AfterViewInit, ControlValueAccessor, O
}
}

/**
* @hidden
*/
public handleKeyDown(evt) {
if (evt.key === 'ArrowUp' || evt.key === 'Up') {
this.onArrowUp(evt);
}
}

private checkMatch() {
this.customValueFlag = this.displayKey || this.displayKey === 0 ?
!this.filteredData
Expand Down

0 comments on commit 676ac89

Please sign in to comment.