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

mat-form-field with outline appearance doesn't resize border when label content change dynamicaly #12353

Closed
jcadiba opened this issue Jul 24, 2018 · 3 comments · Fixed by #12555
Assignees
Labels
P4 A relatively minor issue that is not relevant to core functions

Comments

@jcadiba
Copy link

jcadiba commented Jul 24, 2018

Bug :

mat-form-field with outline appearance doesn't resize border when label content change dynamicaly

What is the expected behavior?

Borders must resize themselves automatically to take into account the dynamic changes of the label

What is the current behavior?

The borders take into account the initial value of the label but after if this value changes and it is longer than the initial value, the borders do not adapt to this change thus leaving a border overlapping the label

What are the steps to reproduce?

from this stackblitz, first when the form launch the label of the outline form field have the value "initial" and after write in first form field that is bind to the second form field mat-label the value "Long dynamic label" you will see the border will overlap the label
https://angular-axyjeg.stackblitz.io (https://stackblitz.com/edit/angular-axyjeg)

Before
2018-07-25 2

After
2018-07-25 3

@mcailleaux
Copy link

Same problem when use ngx translate with label, the gap is calculed with the translate key

<mat-form-field appearance="outline">
    <mat-label translate="ea6.design.menu.header.search"></mat-label>
    <input matInput [(ngModel)]="searchText"
           (ngModelChange)="searchChange()">
    <mat-icon matSuffix>search</mat-icon>
</mat-form-field>

image

@Erick-Zanetti
Copy link

+1

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants