UI Text Input state is not saved (time, date, week color picker)


If the "Mode" property for a Text Input UI Dashboard node is changed to color, time, month, week etc. picker the state (value) is not saved as is with all the other controls included as part of the Dashboard. Note that the state is saved if the Mode property is set to the default value of "Text Input". By "not saved" I mean if you close the UI browser window and then reopen it, the previously selected value is gone.

I'm trying to figure out a good workaround to refresh the value

The obvious solution is to save the state in a flow level variable and then send an input message with the payload set to the stored value. However, I cannot find a way to detect an event for "UI browser opened". One solution is to use an Inject Node that repeats every second. This results in lots of mostly unnecessary messages and therefore is not an efficient solution. Any suggestions would be greatly appreciated. Thanks!



Look at the "ui control" dashboard node, it emits a msg everytime a browser client connects or disconnects.



Why not check this option in the inject node ? The node will send the payload only once.




It is my understanding that startup means when u redeploy or restart Node-Red proper. The information disappears when the UI browser window is closed. Thus I have no event to trigger an injection node.



That sounds like what I was looking for. Thank you!