From 4e3425d0cf0e533e019a61b0ce7cf8ebd01fca70 Mon Sep 17 00:00:00 2001 From: Anton K Date: Wed, 31 Jul 2024 20:20:07 +0200 Subject: [PATCH] FIO-5748 Fixed preview not working correctly after hiding/showing it --- src/WebformBuilder.js | 1 + src/components/panel/Panel.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/WebformBuilder.js b/src/WebformBuilder.js index c8a6554c62..f3f0304a3e 100644 --- a/src/WebformBuilder.js +++ b/src/WebformBuilder.js @@ -1449,6 +1449,7 @@ export default class WebformBuilder extends Component { helplinks: this.helplinks, })); this.editForm.attach(this.componentEdit.querySelector(`[${this._referenceAttributeName}="editForm"]`)); + this.updateComponent(this.editForm.submission.data ?? component); this.attachEditComponentControls(component, parent, isNew, original, ComponentClass); }); }); diff --git a/src/components/panel/Panel.js b/src/components/panel/Panel.js index f6b1761bd1..3d0d6bb7d5 100644 --- a/src/components/panel/Panel.js +++ b/src/components/panel/Panel.js @@ -24,6 +24,7 @@ export default class PanelComponent extends NestedComponent { icon: 'list-alt', group: 'layout', documentation: '/userguide/form-building/layout-components#panel', + showPreview: false, weight: 30, schema: PanelComponent.schema() };