Skip to content

Mat Select - for label not matching with id - do we have to add an extra attribute? #29070

Closed
@dreamstar-enterprises

Description

@dreamstar-enterprises

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions