Closed fooloomanzoo closed 8 years ago
it would look like this and nothing happens
if i select in the upper template like
it works:
In iron-selectable the get items() function queries only the distributed nodes. This would normally take care of it. However, templates embedded within another templates hide it's distributed nodes within the surrounding template. I understand using getDistributedNodes when no selectable attribute is specified. But why not just use querySelectorAll when a selectable attribute is specified?
@fooloomanzii Updated with my fix here: http://jsbin.com/pimazupare/edit?html,console,output
Looks great! Thanks
Firefox seems to have a problem with the solution on only one test. What is weird, is I can make the test succeed by setting the selected item in the test itself. (as long as the item is different than the default selected item) This test succeeds in Chrome. I cannot test Safari, the driver won't work.
Closing as a duplicate of https://github.com/PolymerElements/iron-selector/issues/42. Currently iron-selector only looks at immediate children.
I have a somehow similar issue exposed with this code:
<iron-selector multi attr-for-selected="value" selected-values="{{selectedTimes}}">
<template is="dom-repeat" items="[[days]]">
<template is="dom-repeat" items="[[hours()]]" as="ind">
<div value="[[itemval(item, ind)]]"></div>
</template>
</template>
</iron-selector>
Selection works well, the array selectedTimes is changing as expected.
But pre-setting selectedTimes does not mark any item as selected, strangely.
as an example:
but it doesn't select and I can't figure out why
Code: http://jsbin.com/zuqato/edit?html,console,output