diff --git a/src/app/components/table/table.component.html b/src/app/components/table/table.component.html
index 51bc0e4..7a236c4 100644
--- a/src/app/components/table/table.component.html
+++ b/src/app/components/table/table.component.html
@@ -20,7 +20,7 @@
class="table-control-button"
matTooltip="Tabllendaten aktualisieren. Achtung! Alle ungespeicherten Ă„nderungen gehen verloren."
(click)="reloadTable()"
- [disabled]="reloadingTable"
+ [disabled]="reloadingTable || !isLoaded"
>
sync
@@ -76,7 +76,7 @@
cdkDropListOrientation="horizontal"
(cdkDropListDropped)="drop($event)"
[dataSource]="data"
- [ngClass]="{ 'idle-overlay': !isLoaded }"
+ [ngClass]="{ 'idle-overlay': !isLoaded || reloadingTable }"
>
@@ -383,7 +383,7 @@
>
diff --git a/src/app/components/table/table.component.ts b/src/app/components/table/table.component.ts
index c323a5b..74ec8cc 100644
--- a/src/app/components/table/table.component.ts
+++ b/src/app/components/table/table.component.ts
@@ -164,14 +164,14 @@ export class TableComponent implements AfterViewInit {
this.dataService.tableData.subscribe((newTableDataSource) => {
const tempDataSource = [];
- this.isLoaded = true;
- this.reloadingTable = false;
- this.loadingErrorOccurred = false;
if (newTableDataSource == null) {
this.data.data = [];
- this.loadingErrorOccurred = true;
+ this.loadingErrorOccurred = false;
return;
}
+ this.isLoaded = true;
+ this.reloadingTable = false;
+ this.loadingErrorOccurred = false;
for (const row of newTableDataSource) {
if (row.newObject) {
// its a copied object