Fix quick filtering

This commit is contained in:
Michael Shamoon
2022-03-27 00:09:09 -07:00
parent 7149d407cd
commit 0a29f51862
4 changed files with 14 additions and 21 deletions

View File

@@ -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 {