0

I have aura:iteration and group of radio buttons for each line:

<aura:iteration items="{! v.customList }" var="customListItem">
   <ui:inputRadio name="{! customListItem.Id }" label="Status 1" click="{! c.addToMap }"/>
   <ui:inputRadio name="{! customListItem.Id }" label="Status 2" click="{! c.addToMap }"/>
   <ui:inputRadio name="{! customListItem.Id }" label="Status 3" click="{! c.addToMap }"/>
</aura:iteration>

I want to set default value to radio button based on status from customListItem.

2

You can set the value of ui:inputSelect.

<aura:iteration items="{! v.customList }" var="customListItem">
   <ui:inputRadio value="{!if(customListItem.VALUE == 'YOUR VALUE', true, false)}" name="{! customListItem.Id }" label="Status 1" click="{! c.addToMap }"/>
</aura:iteration>
|improve this answer|||||
  • Super! Thanks a lot! I tried IF(), but it doesn't work :( – Eugene Vabishchevich Apr 19 '17 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.