function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amit Visapurkar 5Amit Visapurkar 5 

How to do lazy loading in lightning components

Hi,

I have a lightning component that displays a list of contacts with a show more button.However i want to have the lazy loading functionality for it the same as we can have for visualforce. Is this possible. 

If yes can anybody share some relevant content.

Thanks
Amit Visapurkar
Ashif KhanAshif Khan
Hi Amit,
In lightning dataTable there is a code sample for infinite loading. Heading as given below 
Using Infinite Scrolling to Load More Rows
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_datatable.htm

This will help you

Regards
Ashif
 
Wade JonesWade Jones
A participant with no previous projects is considered to have no reliability rating, and therefore gets no bonus. Reliability bonus does not apply to Digital Run winnings. For challenges that have a reliability bonus, the bonus depends on the reliability rating at the moment of registration for that project.  Liteblue Login (https://liteblue.me/liteblue-login-online-usps-liteblue-login-gov/)
{tushar-sharma}{tushar-sharma}
You can find a working code sample, which includes many other features as well.

https://newstechnologystuff.com/2018/09/19/lightning-data-table-with-lazy-loading/
Yogendra JangidYogendra Jangid
Hi, if you plan to build out a solution on lazy loading or infinite loading in LWC, check out on blog
https://inevitableyogendra.blogspot.com/2021/05/infinite-loading-in-lightning-datatable.html (https://inevitableyogendra.blogspot.com/2021/05/infinite-loading-in-lightning-datatable.html" target="_blank)
You will get many view and approaches to implement the solution.