cancel
Showing results for 
Search instead for 
Did you mean: 

sap.m.List remove items, after sort

0 Kudos

Hi,

I am experiencing some strange behavior.

I bound a JSONModel to a sap.m.List. The content is loaded from an external system, so unfortunately no oData service is available. I have enabled growing for the list. Everytime the user clicks the "extend" button I am getting the next page of items from the external system and add the new items to the existing JSONModel. This is working.

I also want to sort the list. So I implemented a fragment and setting a sap.ui.model.Sorter to the Binding object. The sorting also works.

But after the list has grown, and I change the sorting all additional items are gone. Only the first set of items is visible. Though, the items are still part of the JSONModel. Interestingly, the shrinking happens between the updateStarted and updateFinished event of the list.

Any idea why this is happening?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I found out, that the growingThreshold is applied during the sorting.

From my point of view this is a bug. I am using a JSONModel, so the items are already loaded. No oData Service available for sorting.
But when I am using the sap.ui.model.Sorter the list shrinks to the size of the growingThreshold. In the background the items still exists, but they have been removed from the list.

Any ideas for a workaround?