Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created February 9, 2019 17:30
Show Gist options
  • Save arun12209/66ea99e30b233c21db9732577a9dea5f to your computer and use it in GitHub Desktop.
Save arun12209/66ea99e30b233c21db9732577a9dea5f to your computer and use it in GitHub Desktop.
RecordList.cmp
<aura:component controller="ListComponentCntrl" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="data" type="Contact[]" />
<aura:attribute name="UnfilteredData" type="Contact[]" />
<aura:attribute name="filter" type="String" />
<aura:handler name="change" value="{!v.filter}" action="{!c.doFilter}" />
<div class="slds-page-header">My Contacts</div>
<lightning:input name="x" value="{!v.filter}" label="Filter" placeholder="Search Contact by "/>
<table class="slds-table slds-table--bordered">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<aura:iteration items="{!v.data}" var="row" indexVar="rowIndex">
<tr>
<td>{!row.Id}</td>
<td>{!row.Name}</td>
<td>{!row.Email}</td>
</tr>
</aura:iteration>
</tbody>
</table>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment