How to use aura:iteration over a list of Wrapper class object in Lightning component 1st Aura iteration works well it prints axisNo and axisName correct. But nested iterate with nested wrapper class list doesn't work.
Code for Component:
<tbody>
<aura:iteration items="{!v.AxisWrapperList}" var="acc" indexVar="sNo">
<!-- Child Lightning Component -->
<table class="slds-table slds-table_bordered slds-table_cell-buffer">
<tbody>
<tr>
<td>{!acc.axisNo}</td>
<td>{!acc.axis.Name}</td>
</tr>
<td>
<aura:iteration items="{!v.AxisWrapperList.OpliWraList}" var="opli">
<table >
<tbody>
<tr>
<td>Quantity:{!opli.quantity}</td>
</tr>
</tbody>
</table>
</aura:iteration>
</td>
</tbody>
</table>
</aura:iteration>
</tbody>
Apex Controller Wrapper class code:
public Class AxisWrapper{
@AuraEnabled
public List<OppLIWrapper> OpliWraList{get;set;}
@AuraEnabled
public Axis__c axis{get;set;}
@AuraEnabled
public Integer axisNo{get;set;}
public AxisWrapper(){
OpliWraList = new List<OppLIWrapper>();
}
}
public Class OppLIWrapper{
@AuraEnabled
public OpportunityLineItem oppli{get;set;}
@AuraEnabled
public integer opliNo{get;set;}
@AuraEnabled
public string pcdate{get;set;}
@AuraEnabled
public integer axNo{get;set;}
@AuraEnabled
public Decimal quantity{get;set;}
@AuraEnabled
public Decimal sellingPrice{get;set;}
@AuraEnabled
public String strWonLost {get;set;}
@AuraEnabled
public boolean showHideTable{get;set;}
@AuraEnabled
public boolean showReqFld{get;set;}
public OppLIWrapper(){
oppli = new OpportunityLineItem();
strWonLost = Null;
showHideTable = false;
showReqFld = False;
}