fix: show spinner after click on retry
This commit is contained in:
parent
a86e88e087
commit
6211dd8889
@ -1,7 +1,7 @@
|
|||||||
@if (loading) {
|
@if (loading) {
|
||||||
<app-data-spinner/>
|
<app-data-spinner/>
|
||||||
} @else {
|
} @else {
|
||||||
<button mat-fab color="primary" (click)="retryFunction.emit()">
|
<button mat-fab color="primary" (click)="retryLoad()">
|
||||||
<mat-icon>refresh</mat-icon>
|
<mat-icon>refresh</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
|
@ -18,4 +18,9 @@ import {MatButton, MatFabButton} from "@angular/material/button";
|
|||||||
export class LoadingIndicatorComponent {
|
export class LoadingIndicatorComponent {
|
||||||
@Input() loading: boolean = true;
|
@Input() loading: boolean = true;
|
||||||
@Output() retryFunction: EventEmitter<void> = new EventEmitter<void>();
|
@Output() retryFunction: EventEmitter<void> = new EventEmitter<void>();
|
||||||
|
|
||||||
|
protected retryLoad() {
|
||||||
|
this.loading = true;
|
||||||
|
this.retryFunction.emit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user