node-red-dashboard
node-red-dashboard copied to clipboard
ui-dropdown - topic is lost when using Accept Client Data
Current Behavior
When Accept Client Data is enabled for ui-dropdown, the topic passed into the dropdown node is lost when a value is selected.
Expected Behavior
The output message from ui-dropdown node retains the topic passed into the node.
Steps To Reproduce
- Set the topic going into the ui-dropdown node.
- Open the dashboard and select a value.
- Observe the output message - the topic is lost.
See reproduction:
[
{
"id": "35a00fcc21bff589",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "2aa91d68bd7d2cf7",
"type": "ui-dropdown",
"z": "35a00fcc21bff589",
"group": "e5ee6bb9bf33fc5f",
"name": "",
"label": "Select Option:",
"tooltip": "",
"order": 1,
"width": 0,
"height": 0,
"passthru": false,
"multiple": false,
"options": [],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 960,
"y": 200,
"wires": [
[
"e0d608487ccd1149"
]
]
},
{
"id": "e0d608487ccd1149",
"type": "debug",
"z": "35a00fcc21bff589",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 960,
"y": 260,
"wires": []
},
{
"id": "9cd6c91afcdbfb2f",
"type": "change",
"z": "35a00fcc21bff589",
"name": "",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "[{\"value\":1,\"label\":\"One\"},{\"value\":2,\"label\":\"Two\"}]",
"tot": "json"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "test-topic",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 720,
"y": 200,
"wires": [
[
"2aa91d68bd7d2cf7",
"e0d608487ccd1149"
]
]
},
{
"id": "5456420d981161db",
"type": "ui-event",
"z": "35a00fcc21bff589",
"ui": "e578ecf151797c4b",
"name": "",
"x": 550,
"y": 200,
"wires": [
[
"9cd6c91afcdbfb2f"
]
]
},
{
"id": "489a7c8d00a851bb",
"type": "inject",
"z": "35a00fcc21bff589",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 570,
"y": 120,
"wires": [
[
"2aa91d68bd7d2cf7"
]
]
},
{
"id": "e5ee6bb9bf33fc5f",
"type": "ui-group",
"name": "Test",
"page": "6722c437d7090ba4",
"width": "6",
"height": "1",
"order": 1,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "e578ecf151797c4b",
"type": "ui-base",
"name": "My Dashboard",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control",
"ui-button",
"ui-dropdown"
],
"showPathInSidebar": false,
"navigationStyle": "fixed",
"titleBarStyle": "default"
},
{
"id": "6722c437d7090ba4",
"type": "ui-page",
"name": "Test",
"ui": "e578ecf151797c4b",
"path": "/test",
"icon": "home",
"layout": "grid",
"theme": "311d097b7376955f",
"order": 1,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "311d097b7376955f",
"type": "ui-theme",
"name": "Default Theme",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
}
]
Environment
- Dashboard version: 1.12.0
- Node-RED version: 3.1.7
- Node.js version: 18.19.1
- npm version: 10.2.4
- Platform/OS: Windows
- Browser: Edge
Have you provided an initial effort estimate for this issue?
I am not a FlowFuse team member