Skip to content

Commit

Permalink
Merge pull request #323 from amosproj/fixed-indexing-bug-in-filtered-…
Browse files Browse the repository at this point in the history
…table

fixed-indexing bug in filtered table
  • Loading branch information
valentinBraeutigam committed Jul 26, 2022
2 parents 7c4e404 + c18be14 commit 8627eab
Showing 1 changed file with 48 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,43 +118,59 @@
class="{{ 'header-' + getButtonColName(i) }}"
></mat-header-cell>
<mat-cell
*matCellDef="let row = dataIndex"
*matCellDef="let data"
class="{{ 'cell-' + getButtonColName(i) }}"
>
<div [ngSwitch]="displayedColNames[i]">
<div *ngSwitchCase="'Edit'">
<button mat-icon-button (mousedown)="this.buttonEvent(row, i)">
<mat-icon>edit</mat-icon>
</button>
</div>
<div *ngSwitchCase="'Delete'">
<!-- <app-delete-icon-clickable
<div *ngIf="{ oldRow: data.table_idx } as variable">
<div [ngSwitch]="displayedColNames[i]">
<div *ngSwitchCase="'Edit'">
<button
mat-icon-button
(mousedown)="this.buttonEvent(variable.oldRow, i)"
>
<mat-icon>edit</mat-icon>
</button>
</div>
<div *ngSwitchCase="'Delete'">
<!-- <app-delete-icon-clickable
[id]="this.tableData[row].id"
[deleteRequest]="this.deleteRequest"
></app-delete-icon-clickable> -->
<button mat-icon-button (mousedown)="openDeleteDialog(row)">
<mat-icon [attr.aria-label]="'Delete item'"> delete </mat-icon>
</button>
</div>
<div *ngSwitchCase="'Expand'">
<button mat-icon-button (mousedown)="this.buttonEvent(row, i)">
<mat-icon>contacts</mat-icon>
</button>
</div>
<div *ngSwitchCase="'Show details'">
<button mat-icon-button (mousedown)="this.buttonEvent(row, i)">
<mat-icon>info</mat-icon>
</button>
</div>
<div *ngSwitchDefault>
<button
mat-raised-button
(mousedown)="this.buttonEvent(row, i)"
class="table-button"
color="primary"
>
{{ displayedColNames[i] }}
</button>
<button
mat-icon-button
(mousedown)="openDeleteDialog(variable.oldRow)"
>
<mat-icon [attr.aria-label]="'Delete item'">
delete
</mat-icon>
</button>
</div>
<div *ngSwitchCase="'Expand'">
<button
mat-icon-button
(mousedown)="this.buttonEvent(variable.oldRow, i)"
>
<mat-icon>contacts</mat-icon>
</button>
</div>
<div *ngSwitchCase="'Show details'">
<button
mat-icon-button
(mousedown)="this.buttonEvent(variable.oldRow, i)"
>
<mat-icon>info</mat-icon>
</button>
</div>
<div *ngSwitchDefault>
<button
mat-raised-button
(mousedown)="this.buttonEvent(variable.oldRow, i)"
class="table-button"
color="primary"
>
{{ displayedColNames[i] }}
</button>
</div>
</div>
</div>
</mat-cell>
Expand Down

0 comments on commit 8627eab

Please sign in to comment.