Hi,
I am stuck trying to populate a ui-dropdown from dashboard 2.0 dynamically. I tried sending just an array and an array of {"value":..., "label": ...}
in msg.options
but nothing seems to work. Any ideas why?
The documentation suggests that this is how it should work: Dropdown ui-dropdown | Node-RED Dashboard 2.0
[{"id":"fe8daff436de03d8","type":"ui-dropdown","z":"b595025349e89c28","group":"5c66023267e5559e","name":"OSC Command","label":"Select Option:","tooltip":"","order":0,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"old","value":"old","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":500,"y":820,"wires":[["5fb82b6f1107296e"]]},{"id":"5fb82b6f1107296e","type":"debug","z":"b595025349e89c28","name":"debug 11","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":700,"y":820,"wires":[]},{"id":"fa282a5e4e2736f3","type":"inject","z":"b595025349e89c28","name":"","props":[{"p":"options","v":"[{\"value\":1,\"label\":\"One\"},{\"value\":2,\"label\":\"Two\"}]","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":250,"y":860,"wires":[["fe8daff436de03d8"]]},{"id":"3345f57cb0d1ef81","type":"ui-button","z":"b595025349e89c28","group":"5c66023267e5559e","name":"","label":"button","order":0,"width":0,"height":0,"passthru":false,"tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"[{\"value\":1,\"label\":\"One\"},{\"value\":2,\"label\":\"Two\"}]","payloadType":"json","topic":"topic","topicType":"msg","x":90,"y":800,"wires":[["d1b0a575a1683efa"]]},{"id":"d1b0a575a1683efa","type":"change","z":"b595025349e89c28","name":"","rules":[{"t":"set","p":"options","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"[]","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":800,"wires":[["fe8daff436de03d8"]]},{"id":"5c66023267e5559e","type":"ui-group","name":"OSC","page":"91018fa40823ab8b","width":"6","height":"1","order":-1,"disp":true},{"id":"91018fa40823ab8b","type":"ui-page","name":"Usecases","ui":"a579bdc3f73a801f","path":"/","layout":"grid","theme":"24b08f838675cf9c","order":-1},{"id":"a579bdc3f73a801f","type":"ui-base","name":"Usecases","path":"/dashboard"},{"id":"24b08f838675cf9c","type":"ui-theme","name":"Theme Name","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"}}]
Best
Marten