angular / angular/components

Sorting a mat-table with expandable rows causes rows to not expand on first click

Aperta
#13,431 11 commenti 6 reazioni 0 assegnatari Vedi su GitHub
area: material/table P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Bug, feature request, or proposal:

Bug

#### What is the expected behavior?

Sorting the mat-table should not affect the expansion of the rows. The behavior should act as in the example table:
https://stackblitz.com/angular/keapqmllkjp?file=app%2Ftable-expandable-rows-example.ts

#### What is the current behavior?

After clicking on a column with sort capabilities and sorting the table, the expandable rows do not open on first click. Clicking a second time will expand the row.

#### What are the steps to reproduce?

https://stackblitz.com/edit/angular-c8kwxe?file=app%2Ftable-expandable-rows-example.ts
1.) Click on a column-header to sort the table
2.) Click the rows to expand
3.) Once you've clicked on a row and it does not expand, clicking on it again will result in nothing. To get it to expand, you have to click another row and then re-click the row again.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

#### Is there anything else we should know?

Oddly, if you cycle through all of the sorted states and get the rows to expand through each state, the rows will then behave normally after doing another sort.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il problema usando gli esempi StackBlitz collegati, iniziando da app/table-expandable-rows-example.ts e dalle interazioni tra l'ordinamento di mat-table e le righe espandibili. Confronta il comportamento prima e dopo l'ordinamento; il lavoro è completato quando le righe si espandono al primo clic dopo qualsiasi stato di ordinamento, come nell'esempio previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.