Update custom widget while having a js script #25212
mtumbarello-eness
announced in
Developers Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Start a discussion
Hi,
I'm currently adding js to my custom widget, I also made it working in the editor but it seems that each time I change any control value of the widget in the editor, the whole script will be reloaded.
First of all I did that (as Elementor advised to do) :
This is my onElementChange function, which is working. The problem isn't there, but this is what I want to use to trigger my functions according to the control value I'm modifying :
And this is my onInit function :
I don't get why each time I change any control value, the onInit() is executed as if an new object spawned instead of keeping the already existant one ? Am I missing something or did I make anything wrong ?
Would appreciate help, I can't find anything on the Elementor Doc speaking about this
Beta Was this translation helpful? Give feedback.
All reactions