paper-radio-button behaves like checkbox when using dom-repeat
Closed this issue · 3 comments
MartonEstok commented
inside a paper-radio-group I've put a dom-repeat template to display a couple of paper-radio-buttons. They behave as they were checkboxes, not deselecting the first selection after the second is made.
This works as expected (from docs):
<paper-radio-group >
<paper-radio-button name="small">Small</paper-radio-button>
<paper-radio-button name="medium">Medium</paper-radio-button>
<paper-radio-button name="large">Large</paper-radio-button>
</paper-radio-group>
This does not:
<paper-radio-group>
<template is="dom-repeat" id="instanceList" items="{{instanceData}}">
<paper-radio-button>{{item.INSTANCE_NAME}}</paper-radio-button>
</template>
</paper-radio-group>
notwaldorf commented
The paper-radio-button
s in the second example don't have a name
attribute, which makes them "different" from the paper-radio-group
's perspective.
If you add names to them (like in the first example), it should work as expected.
MartonEstok commented
This is perfect, I apologize for the false alarm! :)
notwaldorf commented
@MartonEstok No worries! Easy fix :)