Fix: fix re-activation of save button when adding / removing array items

This commit is contained in:
shamoon 2024-11-05 19:58:11 -08:00
parent 1ec652e12c
commit 500920b7b1

View File

@ -710,7 +710,10 @@ export class DocumentDetailComponent
next: (docValues) => {
// in case data changed while saving eg removing inbox_tags
this.documentForm.patchValue(docValues)
this.store.next(this.documentForm.value)
const newValues = Object.assign({}, this.documentForm.value)
newValues.tags = [...docValues.tags]
newValues.custom_fields = [...docValues.custom_fields]
this.store.next(newValues)
this.openDocumentService.setDirty(this.document, false)
this.openDocumentService.save()
this.toastService.showInfo($localize`Document saved successfully.`)