Skip to content

FIO-11328: Fix incorrect PDF display after switching to Form#38

Open
yauheni-formio wants to merge 1 commit intomainfrom
fix/FIO-11328_pdf_display_on_form_switch
Open

FIO-11328: Fix incorrect PDF display after switching to Form#38
yauheni-formio wants to merge 1 commit intomainfrom
fix/FIO-11328_pdf_display_on_form_switch

Conversation

@yauheni-formio
Copy link
Copy Markdown

The issue was caused by creating a shallow copy of builderForm:

this.service.builderForm = { ...this.service.builderForm };

This broke the reference between the Form.io builder (this.builder.builder) and the actual form model. The builder continued to mutate the old object, while the application was saving the new one. As a result, changes like display = 'form' were not reflected during save.

I removed the shallow copy to keep a shared reference between the builder and the form model. This ensured that all updates made by the builder were correctly reflected in builderForm before saving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant