looking at the example on stackblitz: https://stackblitz.com/angular/ygdrrokyvkv?file=app%2Ftable-expandable-rows-example.html
1: How can i expand automatically first row onload?
2: If for example i want to do something like counting how many time i close a row, how can i do that?
in my code i have a button to open and close it:
<td style="text-align: center;" mat-cell *matCellDef="let element">
<mat-icon (click)="expandedElement = expandedElement === element ? null : element">
{{expandedElement === element ? 'expand_less' : 'expand_more'}}
</mat-icon>
</td>
tnx a lot