Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: fix re-activation of save button when adding / removing array items (#8208)

shamoon2f06680f7692
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index 6cd26b368..4fa535ea3 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -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.`)