0
votes

In this example I have angular material table combined with expanded panel. I can click and expand the row. https://stackblitz.com/angular/keapqmllkjp?file=app%2Ftable-expandable-rows-example.ts What to change in that code in order to create a toggle event?

Many thanks!

1

1 Answers

0
votes

I guess that you referred your example from official document of Angular.

https://stackblitz.com/angular/qvokovdpnlx?file=app%2Ftable-expandable-rows-example.ts

And there are wrong source code on line 32 in "table-expandable-example.html".

Wrong: (click)="expandedElement = element"

Correct: (click)="expandedElement = expandedElement === element ? null : element"