Skip to content

Commit 991daac

Browse files
crisbetommalerba
authored andcommitted
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.
1 parent 7c1549a commit 991daac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/select/select.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit,
508508

509509
/** Opens the overlay panel. */
510510
open(): void {
511-
if (this.disabled || !this.options || !this.options.length) {
511+
if (this.disabled || !this.options || !this.options.length || this._panelOpen) {
512512
return;
513513
}
514514

0 commit comments

Comments
 (0)