Ui_dropdown node shows m.map is not a function

Hi

I just face a strange issue with the dropdown node of node-red dashboard.

I set the option as an array as below

msg.payload = ["option1"];
msg.options = ["option1", "option2", "option3"];

And I also set the node as multiple selections
image

But I got an error like this.
image

Does anyone know what does this mean?
Here is my flow

[{"id":"f1a62d2.db357d","type":"ui_dropdown","z":"77940fae.ffea7","name":"","label":"","tooltip":"","place":"Select option","group":"c8c41c36.eb01d","order":8,"width":0,"height":0,"passthru":true,"multiple":true,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":490,"y":680,"wires":[["e6be64b7.f35fa8"]]},{"id":"e6be64b7.f35fa8","type":"debug","z":"77940fae.ffea7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":670,"y":680,"wires":[]},{"id":"28b367c7.3ff2f8","type":"function","z":"77940fae.ffea7","name":"","func":"\nmsg.payload = [\"option1\"];\n\nmsg.options = [\"option1\", \"option2\", \"option3\"];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":320,"y":680,"wires":[["f1a62d2.db357d"]]},{"id":"feefd6da.c723c8","type":"inject","z":"77940fae.ffea7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":680,"wires":[["28b367c7.3ff2f8"]]},{"id":"c8c41c36.eb01d","type":"ui_group","name":"Operation","tab":"860db091.a0872","order":3,"disp":true,"width":"6","collapse":false},{"id":"860db091.a0872","type":"ui_tab","name":"Modbus Control Panel","icon":"dashboard","disabled":false,"hidden":false}]

When you unclick "if message arrives pass through" the error goes away.

The error is from the dropdown node and is saying, That map is not a function that can be preformed on m as m is not an array.

Also the msg.payload = ["option1"]; does not need to be an array = "option1"; is correct

hi - ah yes - slight bug in there... :frowning:
will be sorted.

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