File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/material-experimental/mdc-select Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
116116 get shouldLabelFloat ( ) : boolean {
117117 // Since the panel doesn't overlap the trigger, we
118118 // want the label to only float when there's a value.
119- return ! this . empty ;
119+ return this . panelOpen || ! this . empty ;
120120 }
121121
122122 ngOnInit ( ) {
@@ -147,11 +147,12 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
147147 open ( ) {
148148 this . _overlayWidth = this . _getOverlayWidth ( ) ;
149149 super . open ( ) ;
150+ // Required for the MDC form field to pick up when the overlay has been opened.
151+ this . stateChanges . next ( ) ;
150152 }
151153
152154 close ( ) {
153155 super . close ( ) ;
154-
155156 // Required for the MDC form field to pick up when the overlay has been closed.
156157 this . stateChanges . next ( ) ;
157158 }
You can’t perform that action at this time.
0 commit comments