# V2.23.4 Dropdown sending numbers instead of strings

**URL:** <https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815>\
**Category:** Dashboard\
**Created:** [26 October 2020 09:08 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815 "2020-10-26T09:08:29Z")\
**Posts on this page:** 9\
**Page:** 1

<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:** [26 October 2020 09:08 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/1 "2020-10-26T09:08:30Z")

</div>

After upgrading node-red to 1.2.2 and the dashboard to 2.23.4 I have found some issues with the Dropdown node.

1. Following the upgrade all existing dropdowns now have Allow Multple Selections enabled, which was not the case before.

2. With the node configured like this:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/caea38bd761ca3c94bee94b2e1d1eed02cc48a63.png)

I find that instead of sending strings like "15.0" it is sending the number 15. If I set the value to an alpha string such as abc then it does send a string, but with anything that can be converted to a number it sends that instead of a string. Clearing the labels does not make any difference.

---

<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:** [26 October 2020 16:49 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/2 "2020-10-26T16:49:39Z")

</div>

Here is a little flow to test it. Select option "abc" and it sends the string "abc", select option 1.0 and it sends number 1 instead of string "1.0". I think that has to be a bug doesn't it?

```auto
[{"id":"65a8817f.1c618","type":"ui_dropdown","z":"bdd7be38.d3b55","name":"","label":"","tooltip":"","place":"Select option","group":"a8e4a3.d31edb6","order":3,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"","value":"1.0","type":"str"},{"label":"","value":"abc","type":"str"}],"payload":"","topic":"","x":210,"y":4760,"wires":[["8f66b34d.841898"]]},{"id":"8f66b34d.841898","type":"debug","z":"bdd7be38.d3b55","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":420,"y":4780,"wires":[]},{"id":"a8e4a3.d31edb6","type":"ui_group","name":"Chart","tab":"8032fe72.980b98","order":3,"disp":false,"width":"6","collapse":false},{"id":"8032fe72.980b98","type":"ui_tab","name":"PnH","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

I have reverted to 2.19.4 and confirmed that it works correctly there, I have also confirmed that if a dropdown is added in 2.19.4 and the dashboard updated that Allow Multiple becomes checked, which I think is another bug as it changes the way the node works.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 October 2020 21:19 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/4 "2020-10-26T21:19:21Z")

</div>

Hi Colin - thanks for spotting that - fixed pushed to master on npm.

---

<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:** [26 October 2020 21:22 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/5 "2020-10-26T21:22:47Z")

</div>

Excellent, thanks.

---

<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:** [26 October 2020 21:38 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/6 "2020-10-26T21:38:55Z")

</div>

The second issue seems to be there still, unless I am misinterpreting what is happening. If I revert to 2.19.4 and add a dropdown, then upgrade to master the dropdown has Allow Multiple Selections selected.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 October 2020 22:06 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/7 "2020-10-26T22:06:44Z")

</div>

ah yes - now also fixed... While checking can you also cross check that other issue also ? Thanks

---

<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:** [27 October 2020 10:14 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/8 "2020-10-27T10:14:11Z")

</div>

Yes, all working now, along with the other issue ([Default Value for Dropdown](https://discourse.nodered.org/t/default-value-for-dropdown/34852)). I have added a note there.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [27 October 2020 11:06 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/9 "2020-10-27T11:06:23Z")

</div>

Thanks for the verification

---

<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:** [26 November 2020 11:06 UTC](https://discourse.nodered.org/t/v2-23-4-dropdown-sending-numbers-instead-of-strings/34815/10 "2020-11-26T11:06:27Z")

</div>

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