HI, first post on this forum, but I can say that NodeRed and dashboard 2.0 has fundamentally changed the way I work. Thanks to all the dedicated devs out there!!!
Version: NR4.1, dashboard 2.0
I have a single page barcode capturing app, with a login group and a capture group that is initially hidden. Once logged in successfully, the login group gets hidden and the capture group is then shown. Clients then go about saving scanning barcodes and choosing options and saving to the database without any issues.
The problem happens when one client logs out of the app. The logout button causes the capture group to be hidden and then shows the login group again. On the client where the login happens, all is fine, but the problem is that all other clients using the capture group seem to be given a page refresh, and they lose the data entered on the capture group.
Please can you direct me here? I have tried cehcking ui_event node etc. Just not sure how to proceed furher.
ensure the msg sent to enable/disable includes the _client property that the incoming msg will have (add a debug to the logout button and set it to show complete msg & add a debug node to immediately before ui-control node to ensure _client is STILL present).
If you create a new msg or delete msg._client the message will affect all users.
Watch your node-red logs - is node-red crashing and restarting?
Add an inject set to auto trigger after 5 seconds and link that to a debug node (set to output to console) that outputs "Node-RED Just Started 5 secs ago"
To check if I was being stupid I just created a sandbox example while I was awaiting a reply and it seems that it may have answered my question.
In my actual flow I had a link from the ui_control node to some nodes that cleared the state in the capture group. I then deleted that and it seems to be working.
I am away from the server now and will check in here tomorrow morning.