Closed CWBittencourt closed 4 years ago
Hi @CWBittencourt , there's already a nodeClicked
event for this use case, see here
This event only works for the main node. What I proposed works for any selected row. I need to retrieve the value of any selected row and not just the main node.
I don't know this issue was closed a event to get the values from the line is very usefull.
Could you add this code to the project to facilitate the retrieval of information for deletion and editing?
in treetable.component.ts
@Output() lineClick: Subject = new Subject();
onLineClick(line: T): T{
return line;
}
in treetable.component.html add (click)="onLineClick(element)"
mat-cell *matCellDef="let element" [ngClass]="{'vertical-separator': options.verticalSeparator}" (click)="onLineClick(element)"
result on click