You need to sign in to do that
Don't have an account?
Mohammed Sheriff 1
how to get dynamic checkboxes values in lightning component
<aura:iteration items="{!v.img.content}" var="item" >
<aura:if isTrue="{!item.guid!=null}">
<aura:iteration items="{!item.images}" var="mapValue">
<div class ="gallery">
<img src= "{!v.base + mapValue.imageFile}" style="width:200px;height:200px;"/>
<div class="desc">
<ui:inputCheckbox aura:id="checkbox" name="Select" value ="{!mapValue.aspectRatio}" change="{!c.onCheck}"/>
</div></div>
</aura:iteration>
</aura:if>
</aura:iteration>
({
onCheck: function(cmp, evt) {
var checkCmp = cmp.find("checkbox");
alert(checkCmp.get("v.value"));
}
})
I am having issue with getting the value of the selected checkbox and disabling the other checkboxes ,can someone please help me?
Thanks in advances.
<aura:if isTrue="{!item.guid!=null}">
<aura:iteration items="{!item.images}" var="mapValue">
<div class ="gallery">
<img src= "{!v.base + mapValue.imageFile}" style="width:200px;height:200px;"/>
<div class="desc">
<ui:inputCheckbox aura:id="checkbox" name="Select" value ="{!mapValue.aspectRatio}" change="{!c.onCheck}"/>
</div></div>
</aura:iteration>
</aura:if>
</aura:iteration>
({
onCheck: function(cmp, evt) {
var checkCmp = cmp.find("checkbox");
alert(checkCmp.get("v.value"));
}
})
I am having issue with getting the value of the selected checkbox and disabling the other checkboxes ,can someone please help me?
Thanks in advances.