mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
partial selection model implementation
This commit is contained in:
parent
80420a99f5
commit
b8e7506de4
7 changed files with 199 additions and 209 deletions
|
|
@ -30,9 +30,15 @@ export class DateDropdownComponent implements OnInit, OnDestroy {
|
|||
@Input()
|
||||
dateBefore: string
|
||||
|
||||
@Output()
|
||||
dateBeforeChange = new EventEmitter<string>()
|
||||
|
||||
@Input()
|
||||
dateAfter: string
|
||||
|
||||
@Output()
|
||||
dateAfterChange = new EventEmitter<string>()
|
||||
|
||||
@Input()
|
||||
title: string
|
||||
|
||||
|
|
@ -83,6 +89,8 @@ export class DateDropdownComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
onChange() {
|
||||
this.dateAfterChange.emit(this.dateAfter)
|
||||
this.dateBeforeChange.emit(this.dateBefore)
|
||||
this.datesSet.emit({after: this.dateAfter, before: this.dateBefore})
|
||||
}
|
||||
|
||||
|
|
@ -91,12 +99,12 @@ export class DateDropdownComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
clearBefore() {
|
||||
this.dateBefore = null;
|
||||
this.dateBefore = null
|
||||
this.onChange()
|
||||
}
|
||||
|
||||
clearAfter() {
|
||||
this.dateAfter = null;
|
||||
this.dateAfter = null
|
||||
this.onChange()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue