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
116
116
get shouldLabelFloat ( ) : boolean {
117
117
// Since the panel doesn't overlap the trigger, we
118
118
// want the label to only float when there's a value.
119
- return ! this . empty ;
119
+ return this . panelOpen || ! this . empty ;
120
120
}
121
121
122
122
ngOnInit ( ) {
@@ -147,11 +147,12 @@ export class MatSelect extends _MatSelectBase<MatSelectChange> implements OnInit
147
147
open ( ) {
148
148
this . _overlayWidth = this . _getOverlayWidth ( ) ;
149
149
super . open ( ) ;
150
+ // Required for the MDC form field to pick up when the overlay has been opened.
151
+ this . stateChanges . next ( ) ;
150
152
}
151
153
152
154
close ( ) {
153
155
super . close ( ) ;
154
-
155
156
// Required for the MDC form field to pick up when the overlay has been closed.
156
157
this . stateChanges . next ( ) ;
157
158
}
You can’t perform that action at this time.
0 commit comments