googlearchive / paper-radio-group

A group of radio buttons
6 stars 4 forks source link

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

Open MartonEstok opened 9 years ago

MartonEstok commented 9 years ago

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>
mokarakaya commented 7 years ago

i think it only works when you set name attribute to paper-radio-button and names should be unique