mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-06-30 17:24:22 +00:00
Adds quick filters from document detail
This commit is contained in:
@@ -85,9 +85,15 @@ export class SelectComponent extends AbstractInputComponent<number> {
|
||||
@Input()
|
||||
bindLabel: string = 'name'
|
||||
|
||||
@Input()
|
||||
showFilter: boolean = false
|
||||
|
||||
@Output()
|
||||
createNew = new EventEmitter<string>()
|
||||
|
||||
@Output()
|
||||
filterDocuments = new EventEmitter<any[]>()
|
||||
|
||||
public addItemRef: (name) => void
|
||||
|
||||
private _lastSearchTerm: string
|
||||
@@ -134,4 +140,8 @@ export class SelectComponent extends AbstractInputComponent<number> {
|
||||
this.clearLastSearchTerm()
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
onFilterDocuments() {
|
||||
this.filterDocuments.emit([this.items.find((i) => i.id === this.value)])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user