mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
Try to prevent title debounce overwriting
This commit is contained in:
parent
75d2a3a45f
commit
f78e93a364
1 changed files with 4 additions and 0 deletions
|
|
@ -204,6 +204,10 @@ export class DocumentDetailComponent
|
||||||
)
|
)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: (titleValue) => {
|
next: (titleValue) => {
|
||||||
|
// In the rare case when the field changed just after debounced event was fired.
|
||||||
|
// We dont want to overwrite whats actually in the text field, so just return
|
||||||
|
if (titleValue !== this.titleInput.value) return
|
||||||
|
|
||||||
this.title = titleValue
|
this.title = titleValue
|
||||||
this.documentForm.patchValue({ title: titleValue })
|
this.documentForm.patchValue({ title: titleValue })
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue