Setting Dynamic Data in N.R. for uibuilder jQuery F.E.?

I'm making progress with the basics of uibuilder, but not quite following how to catch changes in "dynamic" data. Let's say I want to catch a value change in the client side jQuery app using the uibuilder pattern:

  uibuilder.onChange( 'myState', function(newVal) {
      console.info( 'myState changed!' )
      console.log( 'myState:' , newVal )
      ... some cool code ...
  })

Is it possible to set the value in a node-red function using something like uibuilder.set('myState','unconfused') so the the onChange callback above spots changes? Or is that not how dynamic values work? Can I only use the getter and setters within the jQuery side code? So in that case, I would use a Node Red function to set the {key:value} inside the msg.payload and then use uibuilder.onChange('msg',callbackFn) just to get the payload (which means I have to store the previous key:values in jQuery code to look for changes)?

You will have to feed data into the uibuilder node. It remains a node-red-node, meaning, passing messages.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.