Skip to content

Commit

Permalink
🐛 [#4012] Fix content component link popup in form builder
Browse files Browse the repository at this point in the history
because the WebformBuilder root was not unmounted after closing the modal, this did not work previously
  • Loading branch information
stevenbal committed Jun 10, 2024
1 parent 69b95dc commit e8606cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/openforms/js/components/formio_builder/WebformBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class WebformBuilder extends WebformBuilderFormio {
const root = createRoot(this.componentEdit);

const onCancel = event => {
console.log('CANCELLING');
event.preventDefault();
root.unmount();
this.emit('cancelComponent', component);
Expand All @@ -113,6 +114,7 @@ class WebformBuilder extends WebformBuilderFormio {
};

const onRemove = event => {
console.log('CLOSING');
event.preventDefault();
// Since we are already removing the component, don't trigger another remove.
saved = true;
Expand Down Expand Up @@ -184,6 +186,7 @@ class WebformBuilder extends WebformBuilderFormio {
// Clean up.
this.removeEventListener(this.dialog, 'close', dialogClose);
this.dialog = null;
root.unmount();
};
this.addEventListener(this.dialog, 'close', dialogClose);

Expand Down

0 comments on commit e8606cf

Please sign in to comment.