nativescript-community / ui-collectionview

Allows you to easily add a collection view (grid list view) to your projects. Supports vertical and horizontal modes, templating, and more.
Apache License 2.0
59 stars 18 forks source link

Strange scroll event scrollOffset #69

Open vallemar opened 10 months ago

vallemar commented 10 months ago

When we declare a scroll event in a CollectionView with multiple templates and without rowHeight we have a strange behavior in the scrollOffset data.

If you scroll down there are times when scrollOffset is less than the previous one, which should not happen since if it is a downward scroll it should always increase.

Reproduction repository:https://github.com/vallemar/collectionview-bug Remove this rowHeight and you will see in the console when you scroll down: DETECTED CHANGE IN SCROLL (it shouldn't appear until you go up the list)

farfromrefug commented 10 months ago

@vallemar do you see that on iOS/android? I think it is normal in the sense that the collection view does not know its full content height. It only estimate it with custom row height( would be too slow to compute with like 1000 items). You see the se behavior with fast scrollers. This is just my guess ! I have not looked at it deeply