mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 17:17:26 +01:00
Clear last search term when clear button clicked
This commit is contained in:
parent
8ddb3e80b7
commit
b6756595d9
4 changed files with 9 additions and 7 deletions
|
|
@ -52,10 +52,10 @@ export class SelectComponent extends AbstractInputComponent<number> {
|
|||
|
||||
clickNew() {
|
||||
this.createNew.next(this._lastSearchTerm)
|
||||
this._lastSearchTerm = null
|
||||
this.clearLastSearchTerm()
|
||||
}
|
||||
|
||||
onFocus() {
|
||||
clearLastSearchTerm() {
|
||||
this._lastSearchTerm = null
|
||||
}
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ export class SelectComponent extends AbstractInputComponent<number> {
|
|||
|
||||
onBlur() {
|
||||
setTimeout(() => {
|
||||
this._lastSearchTerm = null
|
||||
this.clearLastSearchTerm()
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue