Skip to content

Commit

Permalink
[#24] add actions column to uploads table
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphoeninger committed Oct 13, 2024
1 parent e4bd670 commit acce378
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ <h2 class="heading">My Uploads</h2>
</td>
</ng-container>

<!-- Actions Column -->
<ng-container matColumnDef="actions" stickyEnd>
<th mat-header-cell *matHeaderCellDef>&nbsp;</th>
<td mat-cell *matCellDef="let row" style="text-align: right">
<button (click)="onContextMenuAction($event, row)" mat-icon-button>
<mat-icon>more_vert</mat-icon>
</button>
</td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr
mat-row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class UploadsComponent {
@ViewChild(MatTable) table!: MatTable<FileItem>;
@ViewChild(MatMenuTrigger) contextMenu!: MatMenuTrigger;
dataSource = new FileItemsDataSource();
displayedColumns = ['name', 'fileSize', 'createdAt'];
displayedColumns = ['name', 'fileSize', 'createdAt', 'actions'];

fileTypeControl = new FormControl('');
fileTypeGroups = MOCK_FILE_TYPE_GROUPS;
Expand Down

0 comments on commit acce378

Please sign in to comment.