Show/Hide Using ui-control Issues

Hi all,

I have created several different dashboards (both v1 and v2) using the ui-control node to show/hide certain pages and groups or to redirect the user to a particular page with no issues. The syntax obviously changed slightly between dashboard v1 and v2 but everything was working. Today I looked at one of my dashboards and no matter what I did, the ui-control node would not properly show/hide certain pages and groups and wouldn't redirect to different pages. I took the flow and recreated it on a separate, isolated instance and had no issues being able to show/hide or redirect. I connected debug nodes and see no errors. I tried on multiple browsers but still the issue persists. I cleared browser cache and checked for any console errors (there were none). I feel quite dumb as I stated this was working before. Is there something I am missing? Any help would be appreciated.

Is it D1 or D2 that is failing?

D2 is the one failing.

Add a debug node showing what you are sending to the ui-control node and post what it shows for a failing operation.

Show and hide has been improved in the new v1.23.0 released today.

docs: Control ui-control | Node-RED Dashboard 2.0

So now you can do:

msg.payload = {
    groups: {
        show: [
           'abcd1234', // ID of group to show
        ],
        hide: [
           'efgh5678', // ID of group to hide
           'wxyz9876', // ID of group to hide
        ]
    }
}

The advantage of using IDs is if you change the name of the page or group, the ID remains the same.

To get the ID of a group, use the i info panel on the right hand sidebar

1 Like

You didn't tell us, but I am guessing that it stopped working when you changed the group names and added in colons.

That has also been fixed in the most recent release, I believe.

I found the mistake and corrected the issue. Thanks for the assistance.