This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//LazyLoadingAccountController.apex | |
public class LazyLoadingAccountController { | |
@AuraEnabled | |
public static List<Account> getAccountsData(Integer limitSize, Integer offset) { | |
return [ | |
SELECT Id, Name, Industry | |
FROM Account | |
ORDER BY Name | |
LIMIT :limitSize | |
OFFSET :offset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// LazyLoadingContactController.apex | |
public class LazyLoadingContactController { | |
@AuraEnabled(cacheable=true) | |
public static List<Contact> getContactsData(Integer limitSize, Integer offset) { | |
return [ | |
SELECT Id, FirstName,LastName, Email | |
FROM Contact WHERE Name Like 'E%' | |
ORDER BY Name | |
LIMIT :limitSize | |
OFFSET :offset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*serverSideLazyLoadingInHtmlTableWithScrollBar.css*/ | |
.scrollable { | |
overflow-y: auto; | |
border: 1px solid #d8dde6; | |
padding: 0.5rem; | |
} | |
.slds-table thead th { | |
position: sticky; | |
top: 0; | |
background-color: rgba(238, 238, 238, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<!-- Main card to hold the content --> | |
<lightning-card title="Mass Update Leads" icon-name="standard:lead"> | |
<!-- Conditionally render the form only if valid leads exist --> | |
<template lwc:if={validLeadExists}> | |
<div class="slds-p-around_medium"> | |
<!-- Iterate over the list of lead IDs and render forms for each --> | |
<template for:each={leadIds} for:item="leadId"> | |
<div class="slds-m-around_medium" key={leadId}> | |
<!-- Lightning record edit form for updating a lead record --> |
NewerOlder