Skip to content

Commit

Permalink
fix: data-table row actions (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain-Wehrum authored Oct 16, 2023
1 parent 5eca1af commit ab02466
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@
</th>
<td mat-cell *matCellDef="let element" [ngClass]="mode === NONE ? 'no-action-cell' : 'row-action-cell'">
<!-- BATCH: row checkbox -->
<div *ngIf="!element.parentId && (mode === BATCH)" class="mad-datatable-checkbox-container">
<div *ngIf="!element.parentId && (mode === BATCH)" class="mad-datatable-checkbox-container"
(click)="onRowEvent($event, element)"
>
<mat-checkbox
class="no-pointer-events"
[checked]="isSelected(element.rowId)"
Expand Down Expand Up @@ -116,7 +118,10 @@
</th>
</ng-template>
<!-- data cell to be injected -->
<td mat-cell *matCellDef="let element" [class.text-right]="column.isRightAligned" [class.mad-dt-child-cell]="element.parentId" [ngSwitch]="column.transformer">
<td mat-cell *matCellDef="let element"
[class.text-right]="column.isRightAligned" [class.mad-dt-child-cell]="element.parentId"
[ngSwitch]="column.transformer" (click)="onRowEvent($event, element)"
>
<span>
{{ element[column.dataPropertyName] }}
</span>
Expand All @@ -128,7 +133,6 @@
<tr
mat-row
[class.clickable-table-row]="!row.parentId && isRowClickable"
(click)="onRowEvent($event, row)"
*matRowDef="let row; columns: columnIds"
></tr>
</table>
Expand Down

0 comments on commit ab02466

Please sign in to comment.