Skip to content

Commit

Permalink
fix(module:select): display IME input completely (#5657)
Browse files Browse the repository at this point in the history
* fix(module:select): display IME input completely

* fix(module:select): prevent IME input duplication on iOS
  • Loading branch information
QichenZhu authored Sep 24, 2020
1 parent c290ca4 commit 111721a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions components/select/select-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
ViewChild,
ViewEncapsulation
} from '@angular/core';
import { COMPOSITION_BUFFER_MODE } from '@angular/forms';

@Component({
selector: 'nz-select-search',
Expand All @@ -40,7 +41,8 @@ import {
`,
host: {
'[class.ant-select-selection-search]': 'true'
}
},
providers: [{ provide: COMPOSITION_BUFFER_MODE, useValue: false }]
})
export class NzSelectSearchComponent implements AfterViewInit, OnChanges {
@Input() disabled = false;
Expand All @@ -59,8 +61,6 @@ export class NzSelectSearchComponent implements AfterViewInit, OnChanges {
}

onValueChange(value: string): void {
const inputDOM = this.inputElement.nativeElement;
inputDOM.value = value;
this.value = value;
this.valueChange.next(value);
if (this.mirrorSync) {
Expand All @@ -69,6 +69,8 @@ export class NzSelectSearchComponent implements AfterViewInit, OnChanges {
}

clearInputValue(): void {
const inputDOM = this.inputElement.nativeElement;
inputDOM.value = '';
this.onValueChange('');
}

Expand Down

0 comments on commit 111721a

Please sign in to comment.