Update dropdown.ts (#5290)

* Update dropdown.ts

fix the issue that the filtering feature is not working

* format the doc

* comments
This commit is contained in:
Alan Ren
2019-05-01 22:55:53 -07:00
committed by GitHub
parent 3a9b32b6e8
commit a3c022aebf

View File

@@ -219,6 +219,7 @@ export class Dropdown extends Disposable {
this.onBlur(() => {
this.contextViewService.hideContextView();
this._input.validate();
});
this._register(this._tree);
@@ -301,7 +302,7 @@ export class Dropdown extends Disposable {
}
private _inputValidator(value: string): IMessage | null {
if (this._dataSource.options && !this._dataSource.options.find(i => i.value === value)) {
if (!this._input.hasFocus() && !this._tree.isDOMFocused() && this._dataSource.options && !this._dataSource.options.find(i => i.value === value)) {
if (this._options.strictSelection && this._options.errorMessage) {
return {
content: this._options.errorMessage,