I have a list control inside a scroll container. The list implements the scroll to load functionality. The business logic requires the data in the model to be changed. The problem is that after the reload the list contains only the first subset of the data and is scrolled to its end. For example: Each subset consists of 20 list items. If I scroll to the bottom 2 times I will have 60 list items loaded into the UI. After the model reload the list shows only the first 20 elements and is scrolled to the bottom of the 20 list items. What is the best way to make it restore its previos scroll position?
I have been thinking of storing the scroll position of the scroll container and change the number of loaded elements dynamically by changing the growingThreshold property of the list, but because the list can contain hundreds and even thousands of elements the performance might be bad