Build initial themes dynamically?
Opened this issue · 2 comments
Hello.
This is technically not an issue with the project but I was hoping you could provide some insight. I am trying to make Vuse use the initial set of themes from a json object I get through an axios call.
In app.js, I need to move the current lines:
// install the builder
Vue.use(Builder, {
themes: [
{
name: 'Page1',
sections: [hero2, section2, social3, social4, newsletter]
}, {
name: 'Page2',
tiles: [hero1, section1, social1, social3, newsletter]
}]
});
into a method where I will have a json string retrieved from a web service call (in the future). But simply moving this portion of code into a created() method within the app.js Vue declaration causes the builder not to render properly.
I have gone through and verified the builder is still installed with the same options as before and there doesn't appear to be anything wrong data wise. Would I need to go through an force the builder to rerender somehow? Any advice you could give would be greatly appreciated. Thanks!
Answering my own question for anyone interested.
I had to put the line:
vm.$forceUpdate();
after loading the data from a database in create()
This could require an enhancement from our part, Currently, Vuse also does not handle external mutations to the schema which may be needed for some cases.