Show TOC

Growing TableLocate this document in the navigation structure

sap.m.ListBase provides growing-related properties, which can be used for tables and lists.

A growing list has a loading mechanism that requests data from the model in a lazy way. This enables the app to only data from the server as and when necessary.

Note Before release 1.16, the sap.m.GrowingList control existed, as an extension of the sap.m.List control. This is deprecated, use the properties as described here.

The growing-related properties of sap.m.ListBase are:

  • growing: a boolean to set the growing feature on or off
  • growingScrollToLoad: if you want to allow more data to be fetched based on the user scrolling down to the end of the current items, set this boolean property to true; otherwise a trigger button must be used
  • growingThreshold: this is the number of items that are requested each time from the model
  • growingTriggerText: the text on a trigger button used to cause a request for more data

To enable data for a table to be fetched on demand like this, you just need to set the values for these properties appropriately on your table control. For example, adding the highlighted lines as shown:

 <List
    items="{/ProductCollection}"
    headerText="Products"
    growing="true"
    growingThreshold="4"
    growingScrollToLoad="false">
    <StandardListItem
      title="{Name}"
      description="{ProductId}"
      icon="{ProductPicUrl}"
      iconDensityAware="false"
      iconInset="false" />
  </List>

will cause five items to be displayed in the table initially, with a More button (this is the default text if you don't set it with the growingTriggerText property):

Note Note: If you wish to have the user scroll for more (by setting the growingScrollToLoad property to true), you must ensure that the control is within a container that has a scroll feature, such as an sap.m.Page in an sap.m.App control, like this:
<App>
   <Page title="Table Events">
      <Table>
         ...
      </Table>
   </Page>
<App>
Demo App