react-native-sglistview icon indicating copy to clipboard operation
react-native-sglistview copied to clipboard

Premature hiding of rows

Open rexjrs opened this issue 7 years ago • 7 comments

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.

rexjrs avatar Aug 09 '17 15:08 rexjrs

Same issue @sghiassy

davidroman0O avatar Oct 19 '17 11:10 davidroman0O

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 :(

martinosmartinos avatar Dec 21 '17 08:12 martinosmartinos

@sghiassy is there any fix for it or at least direction what causing this issue?

martinosmartinos avatar Jan 17 '18 16:01 martinosmartinos

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?

sghiassy avatar Jan 21 '18 07:01 sghiassy

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.

screenshot_2018-01-21-12-38-38_com mongabay news screenshot_2018-01-21-12-38-42_com mongabay news screenshot_2018-01-21-12-38-47_com mongabay news

martinosmartinos avatar Jan 21 '18 11:01 martinosmartinos

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 avatar Jan 23 '18 19:01 sghiassy

@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. screen shot 2018-01-31 at 15 02 57

martinosmartinos avatar Jan 31 '18 14:01 martinosmartinos