PolymerElements / iron-selector

Manages a list of elements that can be selected
32 stars 55 forks source link

inconsistent type of selected property #84

Closed mgiuffrida closed 8 years ago

mgiuffrida commented 8 years ago

Repro: http://jsfiddle.net/dmw9fgf9/ (see console)

<paper-menu attr-for-selected="data-value">
    <paper-item data-value$="[[val0]]"></paper-item>
    <paper-item data-value$="[[val1]]"></paper-item>
</paper-menu>

paper-menu's selected property is supposed to be type String. What happens when the data-values are Numbers?

I would expect selected to still be a String, especially because data-value$= should bind to the attribute, which is always of type String.

But if val0 and val1 are both Number properties, and val0 is set to 0 and val1 is 1, then selected is a String when the first item is selected, but a Number when the second item is selected.

bicknellr commented 8 years ago

Looks like #102 is going to fix this: before, after. Note the selected branch in the polygit base href.

arthurevans commented 8 years ago

Works in master now, closing.