Skip to content

Component that wraps aura:iteration and split it to pages

Notifications You must be signed in to change notification settings

leshchukandrej/Lightning-Paginator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Lightning-Paginator

Component that wraps aura:iteration and split it to pages

It finds only first aura:iteration tag, other aura:iteration tags would be ignored

Example of using this component:

<c:Paginator elementsPerPage="5">

          <aura:iteration items="{!v.accounts}" var="account" indexVar="i">

                    <c:AccountRecord account="{!account}"/>
 
          </aura:iteration>
          
</c:Paginator>

Paginator

You can use Paginator even with tables like in this example:

<c:Paginator elementsPerPage="5">

    <table>
        <thead>
            <!--Rows-->
        </thead>
        <tbody>
        
        <aura:iteration items="{!v.items}" var="item" indexVar="index">
            <!--Rows-->
        </aura:iteration>
        
        </tbody>
    </table>

</c:Paginator>