Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build initial themes dynamically? #13

Open
snowgears opened this issue Aug 2, 2018 · 2 comments
Open

Build initial themes dynamically? #13

snowgears opened this issue Aug 2, 2018 · 2 comments
Labels
enhancement a "nice to have" feature

Comments

@snowgears
Copy link
Contributor

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!

@snowgears
Copy link
Contributor Author

Answering my own question for anyone interested.

I had to put the line:

vm.$forceUpdate();

after loading the data from a database in create()

@logaretm
Copy link
Contributor

logaretm commented Aug 7, 2018

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.

@logaretm logaretm added the enhancement a "nice to have" feature label Aug 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a "nice to have" feature
Projects
None yet
Development

No branches or pull requests

2 participants