You need to sign in to do that
Don't have an account?
Eric-aeje
How to make a lazy loader with a LWC for:each loop?
Can someone help me find an example or or how to make a lazy loader like this but with a for:each loop ?
I'm getting data from an apex class
public without sharing class Controller { @AuraEnabled (cacheable = true) public static List<Case> getCaselist() { try { return [ SELECT Id, CaseNumber, Status, Description, CreatedDate FROM Case ]; } catch(Exception e) { throw new AuraHandledException('Something went wrong:'+ e.getMessage()); } }
HTML:
<template for:each={recordList} for:item="c" for:index="index"> <div class="table-row" key={c.Id}> <div class="table-col"> {c.Status} {c.Description} {c.CreatedDate} </div> </div> </template>
http://amitsalesforce.blogspot.com/2020/07/lazy-loading-in-lightning-web-component.html
I checked and I see that there is only similar kind of examples that you have mentioned, is there any reason why you need to specifically do only with for:each ?
Looking for your response.
Thanks.