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
@@@we@@@@@@we@@@ 

scrolling in lightning

Hello
I have requriment 
I have list of  data
I want to perform  lazy loading with pagnation
Ex first time display 20record with scroll page
When i scroll  loading more logo
And other 20show
In lighting
Without data table
Its urgent
Deepali KulshresthaDeepali Kulshrestha
Hi,
In order to make your table scrollable you have to use the "slds-scrollable" in the tbody where you are showing the records in the table and to do it without datatable please consider the following example:
<table class="slds-table slds-table_cell-buffer slds-table_bordered">
  <thead>
    <tr class="slds-line-height_reset">
      <th class="" scope="col">
        <div class="slds-truncate" title="Opportunity Name">Opportunity Name</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Account Name">Account Name</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Close Date">Close Date</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Stage">Stage</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Confidence">Confidence</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Amount">Amount</div>
      </th>
      <th class="" scope="col">
        <div class="slds-truncate" title="Contact">Contact</div>
      </th>
    </tr>
  </thead>
  <tbody>
    <tr class="slds-hint-parent">
      <th data-label="Opportunity Name" scope="row">
        <div class="slds-truncate" title="Cloudhub">
          <a href="javascript:void(0);" tabindex="-1">Cloudhub</a>
        </div>
      </th>
      <td data-label="Account Name">
        <div class="slds-truncate" title="Cloudhub">Cloudhub</div>
      </td>
      <td data-label="Close Date">
        <div class="slds-truncate" title="4/14/2015">4/14/2015</div>
      </td>
      <td data-label="Prospecting">
        <div class="slds-truncate" title="Prospecting">Prospecting</div>
      </td>
      <td data-label="Confidence">
        <div class="slds-truncate" title="20%">20%</div>
      </td>
      <td data-label="Amount">
        <div class="slds-truncate" title="$25k">$25k</div>
      </td>
      <td data-label="Contact">
        <div class="slds-truncate" title="jrogers@cloudhub.com">
          <a href="javascript:void(0);" tabindex="-1">jrogers@cloudhub.com</a>
        </div>
      </td>
    </tr>
    <tr class="slds-hint-parent">
      <th data-label="Opportunity Name" scope="row">
        <div class="slds-truncate" title="Cloudhub + Anypoint Connectors">
          <a href="javascript:void(0);" tabindex="-1">Cloudhub + Anypoint Connectors</a>
        </div>
      </th>
      <td data-label="Account Name">
        <div class="slds-truncate" title="Cloudhub">Cloudhub</div>
      </td>
      <td data-label="Close Date">
        <div class="slds-truncate" title="4/14/2015">4/14/2015</div>
      </td>
      <td data-label="Prospecting">
        <div class="slds-truncate" title="Prospecting">Prospecting</div>
      </td>
      <td data-label="Confidence">
        <div class="slds-truncate" title="20%">20%</div>
      </td>
      <td data-label="Amount">
        <div class="slds-truncate" title="$25k">$25k</div>
      </td>
      <td data-label="Contact">
        <div class="slds-truncate" title="jrogers@cloudhub.com">
          <a href="javascript:void(0);" tabindex="-1">jrogers@cloudhub.com</a>
        </div>
      </td>
    </tr>
  </tbody>
</table>
Please go through the following links if you need more information about the scrollable class and table:
https://www.lightningdesignsystem.com/components/data-tables/
https://www.lightningdesignsystem.com/utilities/scrollable/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha.
@@@we@@@@@@we@@@
it  not work 
Actually  i have   table data  more than  1000  
first  time data show  200 record then  next time   when  scroll  list  load more data  with  scroll 
ex   facebook scroll  load more option
Ajay K DubediAjay K Dubedi
Hi Deeps,

For scrolling in lightning use bellow code, it may helpful for you.

Aura component:

<aura:component>
    <ui:scrollerWrapper class="scrollerSize">
        <!--Scrollable content here -->
    </ui:scrollerWrapper>
</aura:component>

CSS file:

.THIS.scrollerSize {
    height: 300px;
}
   
      
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi
@@@we@@@@@@we@@@
not work   i have  div  inside iternation    data