This issue suggests the possibility of disabling the float feature for Angular Material. I attempted the following solution:
.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label,
.mat-form-field-can-float .mat-input-server:focus + .mat-form-field-label-wrapper .mat-form-field-label{
display: none !important;
}
Unfortunately, this did not work as expected. You can view the attempt on StackBlitz here. The SCSS code is located in styles.scss
.
Is there anyone familiar with a method to disable the floating behavior for select fields in Angular 15?