mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-01 01:46:16 +00:00
loading indicator for dashboard widgets
This commit is contained in:
@@ -15,6 +15,8 @@ import { QueryParamsService } from 'src/app/services/query-params.service'
|
||||
styleUrls: ['./saved-view-widget.component.scss'],
|
||||
})
|
||||
export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
loading: boolean = true
|
||||
|
||||
constructor(
|
||||
private documentService: DocumentService,
|
||||
private router: Router,
|
||||
@@ -43,6 +45,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
reload() {
|
||||
this.loading = true
|
||||
this.documentService
|
||||
.listFiltered(
|
||||
1,
|
||||
@@ -52,6 +55,7 @@ export class SavedViewWidgetComponent implements OnInit, OnDestroy {
|
||||
this.savedView.filter_rules
|
||||
)
|
||||
.subscribe((result) => {
|
||||
this.loading = false
|
||||
this.documents = result.results
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user