0
votes

I have an select dialog. For performance reason, I have kept growing threshold as 100 records, out of 2000 total records.

So, the user can see 100 records when popovers open. I had written growingScrollToLoad so that when the user scrolls down, another 100 records get loaded.

However, this is not working somehow. Popover only shows 100 records initially, and even if I scroll down it doesn't load more data. I am not sure what am I doing wrong. I had tried using all the tags/properties describe in SAPUI5 Guidelines. Also, it works in https://sapui5.hana.ondemand.com/#/sample/sap.m.sample.SelectDialog/preview

<SelectDialog confirm="handleConfirm" 
              growingThreshold="100" 
              growingScrollToLoad="true" 
              items="{myModel>/AllData}"
              multiSelect="true" 
              noDataText="No data" 
              liveChange="handleSearchOnDialog" 
              title="Choose" 
              autoAdjustWidth="true">

    <StandardListItem id="idItemA" 
                      description="{Name}" 
                      iconDensityAware="false" 
                      iconInset="false" 
                      title="title" 
                      type="Active"/>
</SelectDialog>
2

2 Answers

0
votes

Please look at the API: https://sapui5.hana.ondemand.com/#/api/sap.m.SelectDialog

You will notice growingScrollToLoad is not listed in the property section of sap.m.SelectDialog ==> you cannot use this functionality

The property growingScrollToLoad is a property of sap.m.ListBase. So if you want to use it you need to create a custom dialog that has a sap.m.List or any other child of sap.m.ListBase as content.
(sap.m.SelectDialog is a direct child to sap.ui.core.Control -> no direct relation to sap.m.ListBase)

0
votes

I found a solution without changing control.

In XML file, I provided growingThreshold="100" growing="true" to Select dialog. In controller file, for onOpen event of Select dialog, I have written this piece of code:

var sGrowingThreshold = this._oSelectDialog.getGrowingThreshold(); //sGrowingThreshold will be 100

if (sGrowingThreshold) 
       {
                this._oSelectDialog.setGrowing(sGrowingThreshold);
       }

It worked and loads data everytime I scroll down till the end.