feat(mat-form-field / mat-label): we need the option to NOT truncate, a long/multi-line mat-label within a mat-form-field #30578
Labels
feature
This issue represents a new feature or feature request rather than a bug or bug fix
needs triage
This issue needs to be triaged by the team
Feature Description
We have a situation where we need a very short input (4 digits) but it has a very long label.
MUCH wider than the required input, and sometimes, much wider than the parent container/page.
Unfortunately, specifying a size on the mat-form-field not only resizes the input, it also resizes and truncates the label to the point of uselessness.
Examples:
In the first field below, we've set the
mat-form-field
style towidth: 16.666667%
Small input with truncated label:

Updated styles with label width 600% to match the parent container (6 x 16.666667%)
This does make the label the full width, however, it's still not big enough to display the full text:
So, we added wrapping, to ensure the full label (and the trailing tooltip icon component within the label) is displayed:
Unfortunately, this then overlaps the input, as the position of the label is hard-coded in the material styles...
Given the DOM of the component after rendering, I can't see any simple way to untangle this problem.
Obviously, on mobile devices this problem is exacerbated substantially:
Any suggestions would be great.
Use Case
No response
The text was updated successfully, but these errors were encountered: