The list view component allows us to display the list view in a custom component. The following example shows the code for the list view component, using a design file to make it generic enough to adopt for any object and any list view:
<aura:component implements="flexipage:availableForRecordHome,flexipage:availableForAllPageTypes"> <aura:attribute name="ObjectName" type="String" default="Account"/> <aura:attribute name="ListViewName" type="String" default="My_Accounts"/> <Lightning:listView aura:id="listViewAccounts" objectApiName="{!v.ObjectName}" listName="{!v.ListViewName}" rows="15" showActionBar="false" enableInlineEdit="true" showRowLevelActions="false"/></aura:component>
The design file for the preceding component ...