New to Sisense so my apologies if I just couldn't find the answer I'm looking for in the forum.
I have some code that I'm presently adding to each widget to sort data after rendering. It's currently using a widget.on('processresult') method in the widget script to do what I want, and that is working.
What I'd like to do is create a small simple plugin to do this, for a few reasons:
1. can edit the script in one place with any updates rather than having to update the script in each widget.
2. Turn the code on/off from the editor rather than commenting/uncommenting the code.
I'm assuming I can just put the code into a .js file and create the plugin.json file to reference the .js file, but I'm stuck with how to wrap the script into a usable format that can be toggled on/off via the editor. Basically turning it "on" would append the code or activate the script, and turning it off would disable it.
Any suggestions/ideas/links to related posts would be appreciated to get me started.
Thanks in advance for any help!
Please sign in to leave a comment.