From 991daac8dd94bdd97c3ccd573a36c3fa34dcf058 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 16 Apr 2018 19:33:19 +0200 Subject: [PATCH] fix(select): open method triggered twice on click (#7619) Fixes the `open` method being triggered both by a click handler on the select trigger and the `onContainerClick` from the `MatFormField` integration. --- src/lib/select/select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/select/select.ts b/src/lib/select/select.ts index 11866e13f3f..2396991650e 100644 --- a/src/lib/select/select.ts +++ b/src/lib/select/select.ts @@ -508,7 +508,7 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit, /** Opens the overlay panel. */ open(): void { - if (this.disabled || !this.options || !this.options.length) { + if (this.disabled || !this.options || !this.options.length || this._panelOpen) { return; }