-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple mat-icon or mat-icon-button as prefix or suffix are displayed in columns #14311
Comments
Fixed it for me on datepicker outlined input field. |
@aennafae thanks, it's the missing part for solution 2 to work properly. |
…ildren when appearance is other than legacy. Also fixes a vertical alignment issue of mat-icon-button as pre/suffix in IE and Edge. Fixes angular#14311, angular#11650, angular#13094, angular#13322 & angular#13592
Still an issue with Angular 10.0.0: |
as a workaround for this, use a single matSuffix div and arrange the items inside however you like: https://stackblitz.com/edit/material-multiple-presuffix-u7kax5?file=app%2Fform-field-prefix-suffix-example.html |
Hi!
::ng-deep .mat-form-field-prefix,
.mat-form-field-suffix {
display: inline-flex;
align-items: center;
}
.mat-form-field-prefix,
.mat-form-field-suffix {
display: inline-flex;
align-items: center;
} |
for material 15 =>
|
|
Bug:
More than one mat-icon or mat-icon-button as prefix or suffix in a mat-form-field are displayed in columns when appearance is other than 'legacy'.
What is the expected behavior?
They should display in row like in 'legacy' appearance.
What is the current behavior?
They are displayed in column.
What are the steps to reproduce?
https://stackblitz.com/edit/material-multiple-presuffix
What is the use-case or motivation for changing an existing behavior?
Behavior is not consistent accros mat-form-field appearances.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/material 7.1.0
All browsers.
Is there anything else we should know?
I see 2 solutions :
Solution 1 :
Remove this two rules :
Solution 2 :
Use flexbox for prefix and suffix :
Potentially related issues : #11650, #13094, #13322 & #13592
The text was updated successfully, but these errors were encountered: