react-native-sglistview
react-native-sglistview copied to clipboard
Premature hiding of rows
When scrolling upwards, it uses its performance technique which hides the row but it does it prematurely.
As soon as the bottom of the row touches the bottom of the screen when scrolling up, that row vanishes. I think what it should do instead if hide the row after it scrolls below the bottom edge of the screen, not as soon as it touches it.
Same issue @sghiassy
Same here and looks bad once hight of a row holding a cell is ca half of a screen. Scrolling upwards leaves almost whole screen blank. Did try premptiveLoading option but with no luck :(
@sghiassy is there any fix for it or at least direction what causing this issue?
Not sure. Truthfully I haven't looked at this project in awhile.
Have you tried using prop: premptiveLoading
? If that doesn't work, perhaps scrollRenderAheadDistance
?
I did try props you mentioned. Basically if one scrolls up then item becomes invisible once its' bottom hits bottom of a screen. Looks like this item becomes part of premptiveLoading. Here is a sequence of a screenshots of what is happening while scrolling up.
Seems like there's a bug in the library's logic of determining when to hide/show cells. Either we're calculating the cell's dimensions incorrectly in calculateDimensionsForCell
or we're incorrectly gauging when to hide/show it in updateCellsPremptively
. Not sure when I'll have time to tackle it tho :/
Happy to list you as a contributor on the repo if you can nail this bug ;)
@sghiassy it is definetly something strange in calculateDimensionsForCell as first element in childFrames is always staying on 0 - height, 0- width and gets y-coordinates of a loaded list.