0

I want to split the data from a single method, which is of the return type of account, contact, and custom object. I have 3 data tables. I want to show all those 3 tables with different objects. Is there any way?

I used Aura:iteration to split. But how we can assign it to different tables.

<lightning:layout>
    <lightning:layoutItem flexibility="auto" title = "First Table" size="12" smallDeviceSize="12" mediumDeviceSize="4" largeDeviceSize="4" padding="around-small">
        <aura:iteration  items="{!v.AccounttList}" var="fieldName" >
            <aura:iteration items = "{!fieldName.Accounts}" var = "Acct">

                <lightning:datatable data = "{!Acct}"> </lightning:datatable>
            </aura:iteration>

        </aura:iteration>     
        <lightning:datatable data="{!v.ContactList}" columns="{! v.mycolumns }"  keyField="id"  />
            </lightning:layoutItem>
   <lightning:layoutItem flexibility="auto" title = "First Table" size="12" smallDeviceSize="12" mediumDeviceSize="4" largeDeviceSize="4" padding="around-small">
        <aura:iteration  items="{!v.AccounttList}" var="fieldName" >
            <aura:iteration items = "{!fieldName.CustomObject}" var = "CObj">

                <lightning:datatable data = "{!CObj}"> </lightning:datatable>
            </aura:iteration>

        </aura:iteration>     

            </lightning:layoutItem>
</lightning:layout>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.