Is there a way to determine if a line has already been expanded when using the toggle feature? When you click on a line, it expands and shows the details. Here is some code in HTML:
<ngx-datatable
#dataTable
...
(select)='onRowSelect($event)'
(activate)="onLoadDataDetails($event)">
In TypeScript:
onRowSelect(row: any): void {
if (row && row.selected) {
this.dataTable.rowDetail.toggleExpandRow(row.selected[0]);
}
}
onLoadDataDetails(row: any): void {
if (row.type === 'click') {
this.loadDetails(row.row.id);
}
}
If the request (this.loadDetails) is triggered every time a line is opened or closed, how can we prevent that?