From a3c022aebf83ed6328ea4f3391f2300940672533 Mon Sep 17 00:00:00 2001 From: Alan Ren Date: Wed, 1 May 2019 22:55:53 -0700 Subject: [PATCH] Update dropdown.ts (#5290) * Update dropdown.ts fix the issue that the filtering feature is not working * format the doc * comments --- src/sql/base/parts/editableDropdown/browser/dropdown.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/base/parts/editableDropdown/browser/dropdown.ts b/src/sql/base/parts/editableDropdown/browser/dropdown.ts index 8a1568ea63..24a73ea80a 100644 --- a/src/sql/base/parts/editableDropdown/browser/dropdown.ts +++ b/src/sql/base/parts/editableDropdown/browser/dropdown.ts @@ -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,