Api umgebaut

This commit is contained in:
Bastian Wagner
2026-02-18 13:56:29 +01:00
parent 40e3ac187e
commit dd59a62e96
8 changed files with 78 additions and 63 deletions

View File

@@ -45,17 +45,19 @@ export class CylinderComponent {
}
loadCylinders() {
this.api.getCylinders().subscribe({
next: n => {
this.gridApi.setGridOption("rowData", n);
this.gridApi.setGridOption("loading", false);
}
})
this.gridApi.setGridOption("loading", true);
this.api.refreshCylinders();
}
onGridReady(params: GridReadyEvent) {
this.gridApi = params.api;
this.loadCylinders();
this.api.cylinders.asObservable().subscribe({
next: (data) => {
this.gridApi.setGridOption("rowData", data);
this.gridApi.setGridOption("loading", false);
}
})
}
openCreateCylinder() {