# Why does ui-control not work?

**URL:** <https://discourse.nodered.org/t/why-does-ui-control-not-work/98922>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [3 September 2025 09:28 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922 "2025-09-03T09:28:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hyxdxhb1231](https://avatars.discourse-cdn.com/v4/letter/h/65b543/32.png) [@hyxdxhb1231](https://discourse.nodered.org/u/hyxdxhb1231)\
**Post date:** [3 September 2025 09:28 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/1 "2025-09-03T09:28:11Z")

</div>

this is the programme. Problem: Even when `widgets: {disable: ['aaa1']}`, the button remains enabled. Can you help identify why the `ui-control` component does not respect the `disabled` binding?

```auto
[
    {
        "id": "b25a83a1347510a1",
        "type": "tab",
        "label": "流程 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "adb3f9612e23595d",
        "type": "ui-button",
        "z": "b25a83a1347510a1",
        "group": "1ff4c0fc452da5ae",
        "name": "aaa1",
        "label": "button",
        "order": 1,
        "width": 0,
        "height": 0,
        "emulateClick": false,
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "iconPosition": "left",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "buttonColor": "",
        "textColor": "",
        "iconColor": "",
        "enableClick": true,
        "enablePointerdown": false,
        "pointerdownPayload": "",
        "pointerdownPayloadType": "str",
        "enablePointerup": false,
        "pointerupPayload": "",
        "pointerupPayloadType": "str",
        "x": 510,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "e9fc72bea92f8026",
        "type": "ui-button-group",
        "z": "b25a83a1347510a1",
        "name": "",
        "group": "1ff4c0fc452da5ae",
        "order": 2,
        "width": 6,
        "height": 1,
        "label": "",
        "className": "",
        "rounded": false,
        "useThemeColors": true,
        "passthru": false,
        "options": [
            {
                "label": "更新",
                "icon": "",
                "value": "true",
                "valueType": "bool",
                "color": "#009933"
            },
            {
                "label": "新增",
                "icon": "",
                "value": "false",
                "valueType": "bool",
                "color": "#999999"
            }
        ],
        "topic": "topic",
        "topicType": "msg",
        "x": 150,
        "y": 320,
        "wires": [
            [
                "83d1ad0abab59021"
            ]
        ]
    },
    {
        "id": "36641f428257d81d",
        "type": "function",
        "z": "b25a83a1347510a1",
        "name": "function 19",
        "func": "msg.payload = {\n widgets: {\n disable: ['aaa1']\n }\n};\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 470,
        "y": 300,
        "wires": [
            [
                "5a2b9b2220bcb8cc"
            ]
        ]
    },
    {
        "id": "0db2b4e3bbad45c5",
        "type": "function",
        "z": "b25a83a1347510a1",
        "name": "function 20",
        "func": "msg.payload = {\n widgets: {\n enable: ['aaa1']\n },\n};\nreturn msg;\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 470,
        "y": 360,
        "wires": [
            [
                "61ab509ad7bd1265"
            ]
        ]
    },
    {
        "id": "5a2b9b2220bcb8cc",
        "type": "ui-control",
        "z": "b25a83a1347510a1",
        "name": "",
        "ui": "164dd866f6ea63b8",
        "events": "all",
        "x": 660,
        "y": 300,
        "wires": [
            []
        ]
    },
    {
        "id": "61ab509ad7bd1265",
        "type": "ui-control",
        "z": "b25a83a1347510a1",
        "name": "",
        "ui": "164dd866f6ea63b8",
        "events": "all",
        "x": 660,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "aedea6e30e492c9f",
        "type": "function",
        "z": "b25a83a1347510a1",
        "name": "手自动使能",
        "func": "msg.enabled = msg.payload;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 330,
        "y": 200,
        "wires": [
            [
                "adb3f9612e23595d"
            ]
        ]
    },
    {
        "id": "0f5c7250cc6a1334",
        "type": "ui-button-group",
        "z": "b25a83a1347510a1",
        "name": "",
        "group": "1ff4c0fc452da5ae",
        "order": 3,
        "width": 6,
        "height": 1,
        "label": "",
        "className": "",
        "rounded": false,
        "useThemeColors": true,
        "passthru": false,
        "options": [
            {
                "label": "更新",
                "icon": "",
                "value": "true",
                "valueType": "bool",
                "color": "#009933"
            },
            {
                "label": "新增",
                "icon": "",
                "value": "false",
                "valueType": "bool",
                "color": "#999999"
            }
        ],
        "topic": "topic",
        "topicType": "msg",
        "x": 150,
        "y": 200,
        "wires": [
            [
                "aedea6e30e492c9f"
            ]
        ]
    },
    {
        "id": "83d1ad0abab59021",
        "type": "switch",
        "z": "b25a83a1347510a1",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "true"
            },
            {
                "t": "false"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 310,
        "y": 320,
        "wires": [
            [
                "36641f428257d81d"
            ],
            [
                "0db2b4e3bbad45c5"
            ]
        ]
    },
    {
        "id": "1ff4c0fc452da5ae",
        "type": "ui-group",
        "name": "test1",
        "page": "622748032a4d55f4",
        "width": "12",
        "height": 1,
        "order": 1,
        "showTitle": true,
        "className": "",
        "visible": "true",
        "disabled": "false",
        "groupType": "default"
    },
    {
        "id": "164dd866f6ea63b8",
        "type": "ui-base",
        "name": "myDashboard",
        "path": "/dashboard",
        "appIcon": "",
        "includeClientData": true,
        "acceptsClientConfig": [
            "ui-notification",
            "ui-control"
        ],
        "showPathInSidebar": false,
        "headerContent": "page",
        "navigationStyle": "default",
        "titleBarStyle": "default",
        "showReconnectNotification": true,
        "notificationDisplayTime": 1,
        "showDisconnectNotification": true,
        "allowInstall": true
    },
    {
        "id": "622748032a4d55f4",
        "type": "ui-page",
        "name": "test",
        "ui": "164dd866f6ea63b8",
        "path": "/page4",
        "icon": "home",
        "layout": "grid",
        "theme": "14bbe2c6e50ccbaf",
        "breakpoints": [
            {
                "name": "Default",
                "px": "0",
                "cols": "3"
            },
            {
                "name": "Tablet",
                "px": "576",
                "cols": "6"
            },
            {
                "name": "Small Desktop",
                "px": "768",
                "cols": "9"
            },
            {
                "name": "Desktop",
                "px": "1024",
                "cols": "12"
            }
        ],
        "order": 1,
        "className": "",
        "visible": "true",
        "disabled": "false"
    },
    {
        "id": "14bbe2c6e50ccbaf",
        "type": "ui-theme",
        "name": "defaultTheme",
        "colors": {
            "surface": "#ffffff",
            "primary": "#0094ce",
            "bgPage": "#eeeeee",
            "groupBg": "#ffffff",
            "groupOutline": "#cccccc"
        },
        "sizes": {
            "density": "default",
            "pagePadding": "12px",
            "groupGap": "12px",
            "groupBorderRadius": "4px",
            "widgetGap": "12px"
        }
    }
]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 September 2025 11:14 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/2 "2025-09-03T11:14:29Z")

</div>

You are right, it does not work with widgets, it does with groups.

Here is a much simpler flow showing the problem

```flows
[{"id":"adb3f9612e23595d","type":"ui-button","z":"b25a83a1347510a1","group":"1ff4c0fc452da5ae","name":"aaa1","label":"aaa1","order":1,"width":0,"height":0,"emulateClick":false,"tooltip":"","color":"","bgcolor":"","className":"","icon":"","iconPosition":"left","payload":"","payloadType":"str","topic":"topic","topicType":"msg","buttonColor":"","textColor":"","iconColor":"","enableClick":true,"enablePointerdown":false,"pointerdownPayload":"","pointerdownPayloadType":"str","enablePointerup":false,"pointerupPayload":"","pointerupPayloadType":"str","x":150,"y":60,"wires":[["7cd148690197b75c"]]},{"id":"36641f428257d81d","type":"function","z":"b25a83a1347510a1","name":"Disable widget aaa1","func":"msg.payload = {\n widgets: {\n disable: ['aaa1']\n }\n};\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":360,"y":140,"wires":[["5a2b9b2220bcb8cc","9332a9d5e9214234"]]},{"id":"0db2b4e3bbad45c5","type":"function","z":"b25a83a1347510a1","name":"Disable group test1","func":"msg.payload = {\n groups: {\n disable: ['test1']\n },\n};\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":200,"wires":[["9332a9d5e9214234","5a2b9b2220bcb8cc"]]},{"id":"5a2b9b2220bcb8cc","type":"ui-control","z":"b25a83a1347510a1","name":"","ui":"ID-BASE-1","events":"all","x":580,"y":140,"wires":[[]]},{"id":"4153459a8a283553","type":"inject","z":"b25a83a1347510a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":140,"wires":[["36641f428257d81d"]]},{"id":"9332a9d5e9214234","type":"debug","z":"b25a83a1347510a1","name":"debug 54","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":220,"wires":[]},{"id":"e7af59f0557d82ae","type":"inject","z":"b25a83a1347510a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":200,"wires":[["0db2b4e3bbad45c5"]]},{"id":"7cd148690197b75c","type":"debug","z":"b25a83a1347510a1","name":"debug 57","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":280,"y":60,"wires":[]},{"id":"f4070ad374e9e75b","type":"function","z":"b25a83a1347510a1","name":"Enable group test1","func":"msg.payload = {\n groups: {\n enable: ['test1']\n },\n};\nreturn msg;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":240,"wires":[["5a2b9b2220bcb8cc","9332a9d5e9214234"]]},{"id":"3e565c8568ac83eb","type":"inject","z":"b25a83a1347510a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":240,"wires":[["f4070ad374e9e75b"]]},{"id":"1ff4c0fc452da5ae","type":"ui-group","name":"test1","page":"622748032a4d55f4","width":"12","height":1,"order":1,"showTitle":true,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-control","ui-notification","ui-gauge-classic"],"showPathInSidebar":false,"headerContent":"page","titleBarStyle":"default","showReconnectNotification":false,"notificationDisplayTime":"1","showDisconnectNotification":true,"allowInstall":true},{"id":"622748032a4d55f4","type":"ui-page","name":"test","ui":"ID-BASE-1","path":"/page4","icon":"home","layout":"grid","theme":"14bbe2c6e50ccbaf","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}],"order":2,"className":"","visible":"true","disabled":"false"},{"id":"14bbe2c6e50ccbaf","type":"ui-theme","name":"defaultTheme","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"density":"default","pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}},{"id":"9b02098421d10b59","type":"global-config","env":[],"modules":{"@flowfuse/node-red-dashboard":"1.26.0"}}]

```

The help text says:  
Enable/Disable Pages & Groups & Widgets  
Dashboard pages & groups & widgets can be disabled & re-enabled by sending a msg.payload object with the format

```auto
msg.payload = {
    pages: {
        enable: ['<Page Name>'],
        disable: ['<Page Name>']
    },
    groups: {
        enable: ['<Group Name>'],
        disable: ['<Group Name>']
    }
}

```

So it says it can be done with widgets, but there is no example of that. I wonder whether it has actually been implemented for widgets.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 September 2025 11:18 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/3 "2025-09-03T11:18:30Z")

</div>

As a workaround you can send msg.enabled true or false direct to the node.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 September 2025 08:41 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/4 "2025-09-05T08:41:25Z")

</div>

@joepavitt, should widget enable/disable work or is this an error in the help text?

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [5 September 2025 11:31 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/5 "2025-09-05T11:31:56Z")

</div>

> [@hyxdxhb1231](#):
>
> Can you help identify why the `ui-control` component does not respect the `disabled` binding?

Just as a test, can you try enabling/disabling it with the ID? From your flow, the ID of aaa1 is “adb3f9612e23595d”. I had the same issue with show/hide groups and using the ID worked.

> [@Dashboard 2: Show/hide group by group name not working?](https://discourse.nodered.org/t/dashboard-2-show-hide-group-by-group-name-not-working/98960):
>
> Hello: When using ui-control to show/hide groups, if I use the group name, it doesn't work and I see and error message in NR logs - Sep 17:55:45 - [error] [ui-control:Show/hide Lux Events] Error: No group found with id or name 'Indoor Lux Events' 4 Sep 17:55:54 - [error] [ui-control:Show/hide Lux Events] Error: No group found with id or name 'Indoor Lux Events' However, if I use the group ID (found it after exporting the flow and searching for ui-group), it works. I had converted another fl…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 October 2025 11:32 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/6 "2025-10-05T11:32:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 December 2025 11:55 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/7 "2025-12-15T11:55:06Z")

</div>



---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 December 2025 11:56 UTC](https://discourse.nodered.org/t/why-does-ui-control-not-work/98922/8 "2025-12-15T11:56:11Z")

</div>

@hyxdxhb1231 This is fixed the dashboard v1.30.0
