Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Cómo mostrar un valor de vista previa en material angular mat-select

Estoy tratando de crear una tabla de compilación donde tengo que seleccionar un valor de una selección de mat.

ingrese la descripción de la imagen aquí

En la tercera columna tengo una lista de valores que puedo elegir

 lunch:infoLunch[]=[{id_lunch: '',desc_lunch:''}, {id_lunch: 'TP1',desc_lunch:'Normale'}, {id_lunch: 'TP2',desc_lunch:'Senza carne'}, {id_lunch: 'TP3',desc_lunch:'Senza carne di maiale'}, {id_lunch: '14/1020',desc_lunch:'14/1020'} ];

Y este es el código html de la columna.

 <ng-container matColumnDef="pasto"> <th mat-header-cell *matHeaderCellDef> Descrizione Pasto</th> <td mat-cell *matCellDef="let studente"> <mat-form-field> <mat-select [disabled]="studente.isAbsent || studente.isGuest" (selectionChange)="checkCheckPastovalue($event, studente)" panelClass="example-panel-dark-blue"> <mat-option *ngFor="let cust of lunch" [value]="cust"> {{studente.isAbsent || studente.isGuest ? '': cust.desc_lunch}} </mat-option> </mat-select> </mat-form-field> </td> </ng-container>

Tengo un json externo de db con valores establecidos o vacíos

 { "idStudenti": 1, "nome": "John", "cognome": "Doe", "isChecked": true, "CodLunch": "TP1", "DescLunch": "Normale", "isGuest": false, "hostSchool": "", "isAbsent": false }, { "idStudenti": 2, "nome": "Giada", "cognome": "Doe", "isChecked": false, "CodLunch": "", "DescLunch": "", "isGuest": false, "hostSchool": "", "isAbsent": false }

¿Cómo puedo mostrar el valor actual de json en mat-select?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Tienes dos opciones para esto:

  • Use filas expandibles para mostrar la información seleccionada dentro de la tabla

--- O ---

  • Tenga una propiedad y vincúlela para que pueda mostrar la información fuera de la tabla en un formato agradable
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!