PolymerElements/paper-radio-group

paper-radio-button behaves like checkbox when using dom-repeat

Closed this issue · 3 comments

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>

The paper-radio-buttons 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.

This is perfect, I apologize for the false alarm! :)

@MartonEstok No worries! Easy fix :)