mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
mmalerba
parent
7c1549a927
commit
991daac8dd
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user