Open globits opened 8 years ago
The test case you provided seems to work. Are you seeing different values for numItems
and expectedItems
? (Maybe I don't understand the issue?)
I solved this issue myself by adding '_updateItems(selectable)'
to the observers array in iron-selectable. An official fix would be nice, please! Just a note, this issue only occurs when the value for selectable
is changed after iron-selectable is attached.
The issue is that _updateItems()
is only called upon attachment and adding and removing items, and is not called again when the value of selectable
is changed.
If you want me to create a pull request I can, but it's just a one line fix; refer to first line of comment.
@bicknellr Any update on wether the Polymer team is going to fix this issue? Also, looks like my previous suggestion is incomplete as you would also have to _updateSelected()
if you should.
Thats exactly the problem, there`s a PR already on https://github.com/PolymerElements/iron-selector/pull/127 , fell free to update it if necessary.
Please, check an updated PR regarding this issue on https://github.com/PolymerElements/iron-selector/pull/149
The
items
property is not updated when selectable property changesExpected outcome
items and selectedItem properties are updated when selectable change.
Actual outcome
items array and selectedItem are not updated when selectable change.
Steps to reproduce
Test Case
http://jsbin.com/qacariqucu/edit?html,js,output