Sorting a mat-table with expandable rows causes rows to not expand on first click
- Langage dominant
- TypeScript
- Étoiles
- 25k
- Forks
- 6.8k
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 91
Description
#### 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez le problème à l’aide des exemples StackBlitz liés, en commençant par app/table-expandable-rows-example.ts et les interactions entre le tri de mat-table et les lignes extensibles. Comparez le comportement avant et après le tri ; le travail est terminé lorsque les lignes se développent au premier clic après n’importe quel état de tri, comme dans l’exemple attendu.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100