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.
This commit is contained in:
Kristiyan Kostadinov
2018-04-16 19:33:19 +02:00
committed by mmalerba
parent 7c1549a927
commit 991daac8dd
+1 -1
View File
@@ -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;
}