mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
Allow independent saved view control
This commit is contained in:
parent
dc1da7cb24
commit
1b55717cc7
4 changed files with 37 additions and 12 deletions
|
|
@ -225,10 +225,7 @@ export class DocumentListViewService {
|
|||
let base = ['/documents']
|
||||
this.router.navigate(base, {
|
||||
queryParams: paramsFromViewState(activeListViewState),
|
||||
replaceUrl: !(
|
||||
this.router.routerState.snapshot.url.includes('?') ||
|
||||
this.router.routerState.snapshot.url.includes('/view/')
|
||||
), // in case navigating from params-less /documents or /view
|
||||
replaceUrl: !this.router.routerState.snapshot.url.includes('?'), // in case navigating from params-less /documents
|
||||
})
|
||||
} else if (this._activeSavedViewId) {
|
||||
this.router.navigate([], {
|
||||
|
|
@ -279,7 +276,6 @@ export class DocumentListViewService {
|
|||
) {
|
||||
this.activeListViewState.sortField = 'created'
|
||||
}
|
||||
this._activeSavedViewId = null
|
||||
this.activeListViewState.filterRules = filterRules
|
||||
this.reload()
|
||||
this.reduceSelectionToFilter()
|
||||
|
|
@ -293,7 +289,6 @@ export class DocumentListViewService {
|
|||
set sortField(field: string) {
|
||||
this.activeListViewState.sortField = field
|
||||
this.reload()
|
||||
this._activeSavedViewId = null
|
||||
this.saveDocumentListView()
|
||||
}
|
||||
|
||||
|
|
@ -304,7 +299,6 @@ export class DocumentListViewService {
|
|||
set sortReverse(reverse: boolean) {
|
||||
this.activeListViewState.sortReverse = reverse
|
||||
this.reload()
|
||||
this._activeSavedViewId = null
|
||||
this.saveDocumentListView()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue