# PlutoUI's Select type has the order of the pairs wrong

**URL:** <https://discourse.julialang.org/t/plutouis-select-type-has-the-order-of-the-pairs-wrong/71082>\
**Category:** Tooling\
**Tags:** pluto, plutoui\
**Created:** [November 7, 2021, 8:44am UTC](https://discourse.julialang.org/t/plutouis-select-type-has-the-order-of-the-pairs-wrong/71082 "2021-11-07T08:44:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [November 7, 2021, 8:44am UTC](https://discourse.julialang.org/t/plutouis-select-type-has-the-order-of-the-pairs-wrong/71082/1 "2021-11-07T08:44:36Z")

</div>

The `Select` type allows the user to create down-down menus with the `@bind` macro. Awesome feature.  
The current behaviour is

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/a/4af245c36c78858b2a741a26458968062b524496.png)

The docs for `Select` look like this:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/8/c8f876cf5fe6b41ec77092fdd7afb5b585414ec2.png)

So in the language of the docs, `"1"` is the key, and `"one"` is the value. key=\>value is consistent with `Dict`, and feels right. But it feels to me as the entry visible in the drop-down is the key, used to index to the right value. The key has a name that makes sense, but the value is what you are really interested in. But currently, the opposite is the case.

Additionally, `keys` are of type string, but `values` are of type any. I want variables to have any type, but drop-down entries to have type `String`. The other way around, which is currently the case, makes no sense:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/f/4ffdb84dafe9cb672f4762416302cdf604304555.png)

Could I be right in saying that the first value, the key of type `String`, should be shown in the drop-down? And that the second value, the value of type `Any`, should be bound to the variable? It makes more sense, and is a lot more powerful.

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [November 22, 2021, 8:27am UTC](https://discourse.julialang.org/t/plutouis-select-type-has-the-order-of-the-pairs-wrong/71082/2 "2021-11-22T08:27:31Z")

</div>

I copied this post into an issue at the PlutoUI repo:  
[https://github.com/JuliaPluto/PlutoUI.jl/issues/159](https://github.com/JuliaPluto/PlutoUI.jl/issues/159)
