Dynamic config settings and preset #165
Unanswered
Ben-Gallienne
asked this question in
Questions
Replies: 1 comment
|
Hi Ben, what you describe should be possible by passing the I put together a small example here: In the example there are two Builder instances, each using a different config ( If you can create a sandbox that reproduces the issue in your setup, I’m happy to take a look and point you in the right direction. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
We want to be able to implement the builder to have its config set dynamically at run time, so that depending on a choice the user makes we can update the config of the builder to add / remove certain panels and elements and so on, effectively making dynamic presets for the different types of form they might build. When we try and edit the object generated by defineConfig, and then pass the config in to the builder directly using the
:configprop, the changes are either ignored, still inherited from the base config passed with the top level plugin, or just cause errors directly. For example, some users need to build forms that do not contain range sliders, so we would like to remove them from the available elements list when this type of form is selected.We implement the builder component on more than one page in the app too, so if there was a way these two builder instances could have completely separate config to one another that would be great to know too please. They both seem to inherit everything set in app.js as part of the plugin instantiation, although they do then seem to override those settings correctly.
What's the appropriate approach I should take here? How can I make the config of the builder something I can dynamically update? Is there a method we should call within the builder code or similar?
Thanks for any advice in advance.
Ben
All reactions