mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-06 23:05:42 +01:00
Fix quick filtering
This commit is contained in:
parent
7149d407cd
commit
0a29f51862
4 changed files with 14 additions and 21 deletions
|
|
@ -249,20 +249,11 @@ export class DocumentListViewService {
|
|||
}
|
||||
|
||||
quickFilter(filterRules: FilterRule[]) {
|
||||
this._activeSavedViewId = null
|
||||
this.activeListViewState.filterRules = filterRules
|
||||
this.activeListViewState.currentPage = 1
|
||||
if (isFullTextFilterRule(filterRules)) {
|
||||
this.activeListViewState.sortField = 'score'
|
||||
this.activeListViewState.sortReverse = false
|
||||
}
|
||||
this.reduceSelectionToFilter()
|
||||
this.saveDocumentListView()
|
||||
if (this.router.url == '/documents') {
|
||||
this.reload()
|
||||
} else {
|
||||
this.router.navigate(['documents'])
|
||||
}
|
||||
const params = this.documentService.filterRulesToQueryParams(filterRules)
|
||||
this.router.navigate(['/documents'], {
|
||||
relativeTo: this.route,
|
||||
queryParams: params,
|
||||
})
|
||||
}
|
||||
|
||||
getLastPage(): number {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue