0

I have a lightning component with aura iteration. i want to dspaly only up to 5 records in the boxes.

variable 'FslFromBox' is having around 70 records here. and i am displaying this in one single div box. In this box, i want only 5 records to be shown. rest of the records(after 5 iterations) should not be shown on the box. Means rest 65 records should be hidden in the div box.

how to achieve this?

Code is below.

<aura:attribute name="FslFromBox" type="list"/>
<div style="background-color:#1589ee" class="slds-col slds-size_3-of-12 fslContainer">
                <div class="userName">
                    <aura:iteration items="{!v.FslFromBox}" var="FslFromBox" indexVar="int">

                            <aura:if isTrue="{!and((FslFromBox.ASQ_12MM__c ge 30),(FslFromBox.ASQ_Close_Rate__c ge 0),(FslFromBox.ASQ_Close_Rate__c lt 10))}">
                             <div class="demo-only">
                                    <span>
                                        <lightning:formattedText value="{!FslFromBox.User__r.Name}"/></span>    
                                </div>
                            </aura:if>
                    </aura:iteration>
                </div>
            </div>
3
  • You are looking for this:- salesforce.stackexchange.com/questions/220287/… May 8, 2019 at 10:11
  • @glls, Pranay Jaiswal, Adrian Larson,No Its not a duplicate question. Requirement is totally different than the one you tagged as Duplicate. Please try getting the answer for me.
    – Amzy
    May 14, 2019 at 15:34
  • No Its not a duplicate question. Requirement is totally different than the one you tagged as Duplicate. Please try getting the answer for me.
    – Amzy
    May 14, 2019 at 15:35

0