Label disappearing after reload

Discussão em 'Angular' iniciado por AntiFalx, Dezembro 10, 2024.

  1. AntiFalx

    AntiFalx Guest

    I have a frustrating bug where, when I select a value to filter something in my mat-table, the table is updated correctly, but when i reload a page, the set value goes back to default (which is ok) but the label that i set to be shown on default disappears until i click on the select again. Pictures are provided as attachments.

    The code:

    <mat-form-field appearance="outline">
    <mat-label>{{ "ticketScope.projectsLabel" | translate }}</mat-label>
    <mat-select (selectionChange)="onChange()" [(ngModel)]="selectedProjectId">
    <mat-option [value]="0">{{ "userInbox.all" | translate }}</mat-option>
    @for (project of projectList; track project) {
    <mat-option [value]="project.id?.toString()">
    {{ project.name }} | {{ project.fullName }}
    </mat-option>
    }
    </mat-select>
    </mat-form-field>


    Scope after:

    [​IMG]

    Scope before:

    [​IMG]

    Continue reading...

Compartilhe esta Página