You need to sign in to do that
Don't have an account?
KARIM EL ALAOUI
IF with vlaues coming from list /Please Help
Dear All,
My If condition is always false even the 2 values compared match each other ?? see picture the result
******************
<aura:iteration items="{!v.reclamationList}" var="reclamation">
<aura:renderIf isTrue="{!reclamation.Type__c == !v.category}">
{!reclamation.Type__c}/{!v.category}--True <aura:set attribute="else"> {!reclamation.Type__c}/{!v.category}--False </aura:set>
</aura:renderIf>
</aura:iteration>
******************
controller:
updateSelect: function(component, event, helper) {
//return the selected value
var cat = component.find("selectItem").get("v.value");
component.set("v.category", cat);
},
My If condition is always false even the 2 values compared match each other ?? see picture the result
******************
<aura:iteration items="{!v.reclamationList}" var="reclamation">
<aura:renderIf isTrue="{!reclamation.Type__c == !v.category}">
{!reclamation.Type__c}/{!v.category}--True <aura:set attribute="else"> {!reclamation.Type__c}/{!v.category}--False </aura:set>
</aura:renderIf>
</aura:iteration>
******************
controller:
updateSelect: function(component, event, helper) {
//return the selected value
var cat = component.find("selectItem").get("v.value");
component.set("v.category", cat);
},
Try the below change in your aura:renderIf
<aura:renderIf isTrue="{!v.category == reclamation.Type__c}">
Thanks,
Maharajan.C
All Answers
Try the below change in your aura:renderIf
<aura:renderIf isTrue="{!v.category == reclamation.Type__c}">
Thanks,
Maharajan.C