Improve Performance

pull/4/head
Max Ehrlicher-Schmidt 4 years ago
parent 97c7c56587
commit 8ccb75697c

@ -9,10 +9,17 @@
matTooltip="Tabllendaten aktualisieren. Achtung! Alle ungespeicherten Änderungen gehen verloren." matTooltip="Tabllendaten aktualisieren. Achtung! Alle ungespeicherten Änderungen gehen verloren."
(click)="reloadTable()" (click)="reloadTable()"
[disabled]="reloadingTable" [disabled]="reloadingTable"
i18n
> >
<mat-icon class="spin">sync</mat-icon> <mat-icon class="spin">sync</mat-icon>
</button> </button>
<button
mat-raised-button
class="table-control-button"
(click)="addEmptyRow()"
[disabled]="reloadingTable"
>
<mat-icon class="spin">add</mat-icon>
</button>
<mat-form-field> <mat-form-field>
<mat-label>Filter</mat-label> <mat-label>Filter</mat-label>
<input <input
@ -23,7 +30,7 @@
/> />
</mat-form-field> </mat-form-field>
<mat-paginator <mat-paginator
[pageSizeOptions]="[25, 30, 50, 100, 500]" [pageSizeOptions]="[15, 25, 30, 50, 100, 500]"
showFirstLastButtons showFirstLastButtons
></mat-paginator> ></mat-paginator>
</div> </div>
@ -60,6 +67,7 @@
</td> </td>
</ng-container> </ng-container>
<!-- Other Columns --> <!-- Other Columns -->
<ng-container <ng-container
*ngFor="let column of columnInfo" *ngFor="let column of columnInfo"
@ -72,8 +80,8 @@
</th> </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<app-cell <app-cell
*ngIf="!column.readonly && element.isLockedByMe; else stringValue" *ngIf="column.type === 'Boolean' || (element.newObject || !column.readonly && element.isLockedByMe); else stringValue"
[editable]="true" [editable]="element.newObject || !column.readonly && element.isLockedByMe"
[(value)]="element[column.name]" [(value)]="element[column.name]"
[inputType]="column.type" [inputType]="column.type"
></app-cell> ></app-cell>
@ -85,7 +93,7 @@
<ng-container matColumnDef="buttons" stickyEnd> <ng-container matColumnDef="buttons" stickyEnd>
<th mat-header-cell *matHeaderCellDef></th> <th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<div class="button-wrapper"> <div class="button-wrapper" *ngIf="!element.newObject">
<button <button
mat-icon-button mat-icon-button
(click)="edit(element)" (click)="edit(element)"

Loading…
Cancel
Save