0

I have aura iteration with the set defined height,in which I am calling another component . I want to capture the scroll bottom action to load more records.

<div class="slds-scrollable" style="height: 40rem; width: 34rem;">

        <aura:iteration items="{!v.timeLineItems}" var="item" end="{!v.displayCount}">

                <c:ActivityTimeLine_Item activityType="{!item.ActivityTimelineType}" itemDetail="{!item}"/>

        </aura:iteration>
    </div>
2
  • <div class="slds-scrollable" style="height: 40rem; width: 34rem;"> <aura:iteration items="{!v.timeLineItems}" var="item" end="{!v.displayCount}"> <c:ActivityTimeLine_Item activityType="{!item.ActivityTimelineType}" itemDetail="{!item}"/> </aura:iteration> </div>
    – Pavan
    Commented Mar 18, 2019 at 1:54
  • 1
    Hi Pavan, and welcome to SFSE! In the future, you can use the {} button to format your code correctly. I've fixed this for you this time, as well as adding a tag so that the appropriate people will see your question.
    – sfdcfox
    Commented Mar 18, 2019 at 2:01

1 Answer 1

0

Try using Data Table with attribute onloadmore attribute and fetch records again passing the limit or number of records you want to load. Here is the link for example- Example

2
  • Thanks for the reply, I think datatable is for list view's, I have to pass task list in timeline custom component and when you scroll it should load more records.
    – Pavan
    Commented Mar 18, 2019 at 11:37
  • I got the solution.. var element = document.getElementById('activityDivId'); if((element.scrollHeight - element.scrollTop - element.clientHeight) < 20 ) { you can right your loadmore logic here. } it worked for me.
    – Pavan
    Commented Mar 20, 2019 at 13:15

Not the answer you're looking for? Browse other questions tagged .