angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.31k stars 6.72k forks source link

bug(mat-label): mat-label overlap control and does not show ellipsis #26337

Open Flo0806 opened 1 year ago

Flo0806 commented 1 year ago

Is this a regression?

The previous version in which this bug was not present was

I'm not 100% sure, but it worked before

Description

The mat-label does not wrap the text with ellipsis anymore in the mat-datepicker. Instead the text goes over the icon/control itself. image

<mat-form-field style="width: 200px;">
  <mat-label>To long to show all text</mat-label>
  <input
    matInput
    [matDatepicker]="dateLoan"
    readonly
    formControlName="dateFinalPaymentControl"
  />
  <mat-datepicker-toggle matSuffix [for]="dateLoan"></mat-datepicker-toggle>
  <mat-datepicker #dateLoan></mat-datepicker>
</mat-form-field>

Reproduction

Steps to reproduce:

  1. Simple add create a mat-datepicker with a mat-label with new version 15.x

Stackblitz is available

Expected Behavior

Before the text was trimmed with ellipsis like this:

image

Actual Behavior

Now is go outside the control/over the icon:

image

Environment

ChristianKlima commented 1 year ago

We have the same error with appearance="outlined".

pschmid667 commented 6 months ago

What's the status of this? I see there's already an open MR to fix the issue

daryakalenik commented 1 week ago

same thing image