mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-26 01:16:16 +00:00
Fix: global search filtering links broken in 2.8.4 (#6726)
This commit is contained in:
@@ -163,7 +163,9 @@ export class GlobalSearchComponent implements OnInit {
|
||||
let params = queryParamsFromFilterRules([
|
||||
{ rule_type: filterRuleType, value: object.id.toString() },
|
||||
])
|
||||
this.navigateOrOpenInNewWindow(['/documents', params], newWindow)
|
||||
this.navigateOrOpenInNewWindow(['/documents'], newWindow, {
|
||||
queryParams: params,
|
||||
})
|
||||
} else if (editDialogComponent) {
|
||||
const modalRef: NgbModalRef = this.modalService.open(
|
||||
editDialogComponent,
|
||||
@@ -378,12 +380,18 @@ export class GlobalSearchComponent implements OnInit {
|
||||
this.reset(true)
|
||||
}
|
||||
|
||||
private navigateOrOpenInNewWindow(commands: any, newWindow: boolean = false) {
|
||||
private navigateOrOpenInNewWindow(
|
||||
commands: any,
|
||||
newWindow: boolean = false,
|
||||
extras: Object = {}
|
||||
) {
|
||||
if (newWindow) {
|
||||
const url = this.router.serializeUrl(this.router.createUrlTree(commands))
|
||||
const url = this.router.serializeUrl(
|
||||
this.router.createUrlTree(commands, extras)
|
||||
)
|
||||
window.open(url, '_blank')
|
||||
} else {
|
||||
this.router.navigate(commands)
|
||||
this.router.navigate(commands, extras)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user