lazy loading sfdcMonkey

How To Implement Infinity Or Lazy Loading In Salesforce Lightning DataTable

Lightning Component

Hi guys welcome back, Today in this post we are going to learn how we can implement infinity or lazy loading in salesforce ‘lightning:datatable’ lightning component using offset feature.

lazy loading lightning datatble

From developer console >> file >> new >> Apex Class

Apex Class : AccountTableController.apxc

From developer console >> file >> new >> Lightning Component 

Lightning Component : infinityLoading.cmp

JavaScript Controller : infinityLoadingController.js

JavaScript Helper: infinityLoadingHelper.js

Check code comments.

Infinity Loading Component Output :

lazy loading lightning datatble

 

Related Resources :

Other popular Post :

Like our facebook page for new post updates. & Don’t forget to bookmark this site for your future reference.

if you have any suggestions or issue with it, you can post in comment box.

Happy Learning ?

About The contributor: 

Kiran.B

3 Post Contribute

kiran b sfdcMonkey

I have 3.5 years of experience and working in lightning for the past 1 year. I am working as a developer in Deloitte.

Skills : Apex ,lightning , visualforce,sales cloud,JavaScript,Einstein analytics

 

 

Post By Kiran :

  1. How To Implement Infinity Or Lazy Loading In Salesforce Lightning DataTable
  2. How To Implement Column Sorting In Salesforce Lightning DataTable
  3. Develop a Simple To-Do List App With Salesforce Lightning Component
(Visited 1 times, 1 visits today)
    (Visited 4,362 times, 1 visits today)

    3 comments

    • This is giving error as

      Error in $A.getCallback() [Cannot read property ‘setParams’ of undefined] Callback failed: apex://AccountTableController/ACTION$getAccountRecords Failing descriptor: {c:infinityLoading}

      Please help.

      Thank you!

    • I am getting following error,Please help.

      Error in $A.getCallback() [Cannot read property ‘setParams’ of undefined] Callback failed: apex://AccountTableController/ACTION$getAccountRecords Failing descriptor: {c:infinityLoading}

    • This page has an error. You might just need to refresh it.
      Error in $A.getCallback() [toastReference is undefined]
      Callback failed: apex://AccountTableController/ACTION$getAccountRecords
      Failing descriptor: {c:LazyLoadingLDT}

    Leave a Reply