Closed SleepyMan closed 8 years ago
+1 I am also having this issue and was wondering if any progress has been made on it?
@SleepyMan Any interest in sending a PR to fix this? :)
I just ran across this the other night looking at an issue someone else reported, and came to the same conclusion as @SleepyMan... I can do a PR.
Sent. Consider if you will.
When selectable invokes _valueForItem, it gets the value, but it tests for falsy values at line 239:
This removes the ability to set the attribute to 0, as it would fail the first test (item[attr]), and go for the second one (getAttribute), which returns a null, thus becoming unselectable (while visually selectable in the case of paper-radio)
Example:
Using paper-radio-group and repeating template, if I were to set the name (value) of the paper-radio-button as its index (first button would be 0, second would be 1, etc.), then the first one would seem selectable, but when reading the selected attribute, it would be null, as if nothing was selected, while the others would be ok. It does fire the "paper-radio-group-changed", but with a value of null.
Changing the offending line, allows to set indexes as values correctly.