feat: RefreshService zu GroupTable hinzugefügt und integriert

This commit is contained in:
Developer 02 2024-07-24 14:56:03 +02:00
parent f9f02dfcf8
commit f625edfab0
2 changed files with 12 additions and 2 deletions

View File

@ -1 +1 @@
<app-group-table></app-group-table>
<app-group-table #groupTable></app-group-table>

View File

@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { GroupTableComponent } from '../../components/tables/group-table/group-table.component';
import { RefreshService } from '../../services/refresh.service';
@Component({
standalone: true,
@ -9,5 +10,14 @@ import { GroupTableComponent } from '../../components/tables/group-table/group-t
styleUrl: './group.component.css'
})
export class GroupComponent {
constructor(private refreshService: RefreshService) { }
ngAfterViewInit(): void {
this.refreshService.removeAll()
this.refreshService.add(() => {
this.groupTable.fetchData();
});
}
@ViewChild("groupTable") groupTable!: GroupTableComponent
}