I have a default config parameter isTrue: {value:""}
On the start of my oneditprepare function i set if(node.isTrue) {node.isTrue = !node.isTrue}
On the end of my oneditsave function i set it if(node.isTrue){node.isTrue = !node.isTrue}
So basically i want when the node is opened isTrue to be set to true and when its closed i want to make it false.
The problem i get is that when i do this it changes the value only 1st time 1 open the node. Second time i open it it doesnt change the value oneditsave
Any idea why?
I managed to do it yea. Because some websocket functions i have in my node is constantly calling even if i close the node. This way i managed to make it not call the function when the node is closed.
If i try to disable them then i get some other errors that i dont know how to fix. This way it works fine.
Only 1 problem is that i have to click 2 times on the button to unsubscribe the element.