I'm having trouble getting a json created in the settings.js to communicate with the actual widget.js in my custom widget.
I've got a widget I'm working on that allows the user to specify some settings when it's first created in the Web Appbuilder. When the settings is closed, it creates a json representation of the settings and replaces the (initially empty) config.json file with the new one. This appears to function correctly when I log everything to the console in the settings.js, but when I try to load the config from the widget.js, all I'm seeing is the initially empty json. I'm not sure how I'm supposed to go about overriding the getConfig and setConfig functions in the settings.js to get the new json to replace the empty one. As it stands right now, those two methods exist in the settings.js and look like this:
setConfig: function(config){ this.config = config; },
getConfig: function() { this.config.users = outFinal; return this.config; },
where outFinal
is the json. This is also the argument being passed to setConfig.
Anyone have any support regarding something like this? Am I on the right track or going in a completely incorrect direction?
Thank you!