Skip to content

Commit

Permalink
update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ylebre committed Mar 1, 2024
1 parent 70164fb commit a5dd48a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3837,9 +3837,11 @@ <h1>App preview</h1>
var componentNameField = simplyApp.actions.getComponentNameField(component);
editor.pageData.component.parts[component].forEach(function(part) {
var found = false;
editor.pageData.app[component].forEach(function(appPart) {
editor.pageData.app[component].forEach(function(appPart, appIndex) {
if (part[componentNameField] && (appPart[componentNameField] == part[componentNameField])) {
appPart = JSON.parse(JSON.stringify(part));
for (i in part) {
editor.pageData.app[component][appIndex][i] = part[i];
}
found = true;
}
});
Expand All @@ -3849,6 +3851,10 @@ <h1>App preview</h1>
});
}

document.querySelectorAll("[data-simply-transformer=simplyPreviewComponent]").forEach(function(element) {
element.innerHTML = editor.transformers.simplyPreviewComponent.render.call(element, element.dataBinding.get());
});

simplyApp.commands.autoRunPreviews()
}, 500);
}
Expand Down

0 comments on commit a5dd48a

Please sign in to comment.