Skip to content
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

In latest angular and material version placeholderLabel not showing #256

Closed
aminsmartsenese opened this issue Aug 18, 2020 · 4 comments · Fixed by #257
Closed

In latest angular and material version placeholderLabel not showing #256

aminsmartsenese opened this issue Aug 18, 2020 · 4 comments · Fixed by #257
Labels
bug Something isn't working
Milestone

Comments

@aminsmartsenese
Copy link

aminsmartsenese commented Aug 18, 2020

"@angular/material": "^10.1.3",
"@angular/cli": "~10.0.6"

If mat-form-field with [floatLabel]="'never'" this property.

@aminsmartsenese aminsmartsenese added the bug Something isn't working label Aug 18, 2020
@macjohnny
Copy link
Member

@aminsmartsenese thanks for reporting the issue.
would you like to find a fix?

@aminsmartsenese
Copy link
Author

@aminsmartsenese thanks for reporting the issue.
would you like to find a fix?

Thank you @macjohnny

Yes looking solution for that.
If mat-form-field with [floatLabel]="'never'" this property on that time issue is coming.

@martibenn
Copy link

angular/components#20080
No help from Angular-Material 😐

@macjohnny
Copy link
Member

macjohnny commented Aug 19, 2020

the problem is that in
https://github.com/angular/components/blob/1f6b90c0a515397526d7c6b35f047827bfaa8652/src/material/input/input.ts#L369-L374

the this._formField is the parent select component, since there is no form field surrounding the matInput.

A solution would be to remove the matInput directive and ensure that the correct styles are applied.

@macjohnny macjohnny added the help wanted Extra attention is needed label Aug 19, 2020
macjohnny added a commit that referenced this issue Aug 19, 2020
@macjohnny macjohnny removed the help wanted Extra attention is needed label Aug 20, 2020
@macjohnny macjohnny added this to the 3.1.0 milestone Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants