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 Select - for label not matching with id - do we have to add an extra attribute? #29070

Closed
dreamstar-enterprises opened this issue May 19, 2024 · 3 comments

Comments

@dreamstar-enterprises
Copy link

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

Yes

Description

I think this was actually fixed: #28948

I didn't quite understand from the above what we were meant to do.

But are we meant to include an extra attribute somewhere here:

    <!-- label -->
    <mat-label>
      {{entry.key | getAllowanceKey: false}} Allowance Basis
    </mat-label>
  
    <!-- select -->
    <mat-select
      id="allowanceBasis-hardware-{{$index}}"
      formControlName="allowanceBasis"
      required>
      <mat-option>-- None --</mat-option>
      @for (allowanceBasisType of
        AllowanceBasisTypes | sortAlphabetical;
        track allowanceBasisType) {
        <mat-option [value]="allowanceBasisType">{{allowanceBasisType | replaceUnderscores | titleCase}}</mat-option>
      }
    </mat-select>

to prevent this:

243509402-88ceec48-3c7d-4c7a-a62c-4b9d3694c3f2

Thank you

Please provide a link to a minimal reproduction of the bug

Please see above

Please provide the exception or error you saw

See above

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No

@JeanMeche JeanMeche transferred this issue from angular/angular May 19, 2024
@crisbeto
Copy link
Member

You shouldn't have to do anything for the fix from #28948. Maybe you aren't on the right version? The fix was released in 17.3.6.

@dreamstar-enterprises
Copy link
Author

I'm on "@angular/core": "^17.3.2", and I get this:

Screenshot 2024-05-20 at 00 59 15

How do I upgrade?

@crisbeto
Copy link
Member

That's working as expected since now it's being flagged as an informational message, not an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants