I am using
RED.nodes.eachConfig in my custom side panel, so the side panel can work with different instances of a config node. (each instance has various HTTP Admin Endpoints addressed by their
And all this works well.
However, I find that
RED.nodes.eachConfig also returns disabled nodes (config nodes in this case).
and the array items returned by
RED.nodes.eachConfig does not contain the
enabled property (which would have been perfect)
As currently it will list a config node that is not enabled.
I guess I am after how I can obtain the
enabled property for a config node within the editor (or side panel to be precise)
Sorry if I have put this under wrong category
There is no such property. There is, however, a
disabled property that will be set to true if the node is disabled.
I think I found it.
But I think its not
d as it appears for a disabled config node?
Are you sure you want to use RED.nodes.eachConfig? The reason I'm asking is that that gives you a point-in-time snapshot. I think you're better off with nodes:add, nodes:change, and nodes:remove hooks so you can update your sidebar as config nodes are added/removed...
eachConfig is perfect as that is used during side panel render time only, which is client side.
I also use the
RED.Comms namespace and this updates the side panel as my config nodes advertise them self during start up, which the client side panel subscribes to. This needs to happen only when the config node has fully initialised, and is ready for interaction.
eachConfig is used to render currently known configs when the editor is loaded , after this,
RED.Comms takes over
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.