You need to sign in to do that
Don't have an account?
pandi GS
The aura:if not validating the INDEX inside the Aura:iteration issue
HI,
I am iterating the list and i want to display in the columns. i am checking the index inside the iteration, and when i compare in aura if, it is not working. The check always goes to ELSE part only. What mistake i'm doing? please help
I am iterating the list and i want to display in the columns. i am checking the index inside the iteration, and when i compare in aura if, it is not working. The check always goes to ELSE part only. What mistake i'm doing? please help
<aura:attribute name="ALCDMLst" type="List" default="[ {'label': 'All Adults', 'value': 'AllAdult','Child':[]}, {'label': 'Lifestyle Topics', 'value': 'option1','Child':[{'label':'Unhealthy Diet','value':'UD'},{'label':'Inadequate Exercise','value':'IE'},{'label':'Stress','value':'ST'}]}, {'label': 'Heart and Blood Vessel Conditions', 'value': 'option2','Child':[{'label':'Blood Clot','value':'BC'},{'label':'Heart Failiure','value':'HF'},{'label':'Stroke','value':'SK'}]}, {'label': 'Diabetes', 'value': 'option3','Child':[]}, {'label': 'Lung Condition', 'value': 'option4','Child':[{'label':'Asthma','value':'AS'},{'label':'COPD','value':'CPD'}]}, {'label': 'Stomach and Intenstine Conditions', 'value': 'option5','Child':[{'label':'Chronic hepatitis B or C','value':'hipa'},{'label':'Stomach Ulcer','value':'SCU'}]}, {'label': 'Cancer', 'value': 'option6','Child':[{'label':'Colon','value':'CN'},{'label':'Lung','value':'LG'}]} ]"/> <aura:iteration var="oppz" items="{!v.ALCDMLst}" indexVar="indexs"> <aura:if istrue="{!lessthan(indexs , 3)}"> True <aura:set attribute="else"> False </aura:set> </aura:if>
Complete code