Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

improvements to the filter.

jonaswinklerc4d13b580267
diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts
index 84f4bc09e..153b31d8c 100644
--- a/src-ui/src/app/components/document-list/document-list.component.ts
+++ b/src-ui/src/app/components/document-list/document-list.component.ts
@@ -53,11 +53,10 @@ export class DocumentListComponent implements OnInit {
this.list.savedView = this.savedViewConfigService.getConfig(params.get('id'))
} else {
this.list.savedView = null
+ this.showFilter = this.filterRules.length > 0
}
this.filterRules = this.list.filterRules
- this.showFilter = this.filterRules.length > 0
- // prevents temporarily visible results from previous views
- this.list.documents = []
+ this.list.clear()
this.list.reload()
})
}
diff --git a/src-ui/src/app/services/document-list-view.service.ts b/src-ui/src/app/services/document-list-view.service.ts
index 9c7e244f4..811ac3c4b 100644
--- a/src-ui/src/app/services/document-list-view.service.ts
+++ b/src-ui/src/app/services/document-list-view.service.ts
@@ -82,6 +82,12 @@ export class DocumentListViewService {
this.reload()
}
+ clear() {
+ this.collectionSize = null
+ this.documents = []
+ this.currentPage = 1
+ }
+
reload(onFinish?) {
this.isReloading = true
this.documentService.list(