How can I bind attribute to result of lightning:input type="radio"
I have tried the following
<aura:attribute name="colors" type="String[]" default="Red,Green,Blue"/>
<aura:attribute name="selectResult" type="Boolean[]" default="false, false, false"/>
<lightning:input type="radio" name="select" label="{!v.colors[0]}" checked="{!v.selectResult[0]}"/>
<lightning:input type="radio" name="select" label="{!v.colors[1]}" checked="{!v.selectResult[1]}"/>
<lightning:input type="radio" name="select" label="{!v.colors[2]}" checked="{!v.selectResult[2]}"/>
{!v.selectResult[0]}
{!v.selectResult[1]}
{!v.selectResult[2]}
But the results are not updated after the value is unchecked, so after clicking on all three radio's all results will be set as true
I have also tried to use
value="{!v.result}"
but this ends up with empty attribute