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

There is a bug when sliding up rapidly

Open lmllml opened this issue 8 years ago • 4 comments

When I slide down, everything is normal. But when I slide up rapidly, there are some blank around item.

0439b43f-88e3-4c0c-98ba-9c9f7af9d345

lmllml avatar Nov 24 '15 03:11 lmllml

@liyandalmllml - we were having the same problem (see #2 #4 #5 #9 #10) so I created a fork that used a completely different method for testing visibility. This branch and commit should fix that issue. There is a pul request here: #10. To use:

"react-native-sglistview": "git://github.com/rreusser/react-native-sglistview.git#d962a66ef70a7f4920bf9f96260b26032233d060"

Really though, the correct solution for us was to turn on removeClippedSubviews={true} (see this page). This option is superior if it works and is now enabled by default for this reason. If it works for you, I would recommend it. If not, then I recommend my branch.

rreusser avatar Nov 24 '15 09:11 rreusser

removeClippedSubviews={true} will work for you @lmllml.

But @rreusser, I don't think removeClippedSubviews works for all situations. I believe if you have a row with an image in it. You'll still want to use this library over removeClippedSubviews.

sghiassy avatar Nov 25 '15 20:11 sghiassy

@rreusser @sghiassy Thanks for reply. I hava test turn on removeClippedSubviews={true}, but It looks like have little effect. It is true memory is not straight up, but also bumps increase. As rows increase, memory usage is not acceptable. Post my code and memory data graph below. Is there any mistakes? 1 2 3 4 Later I will test @rreusser's branch, see whether it is effective.

lmllml avatar Dec 01 '15 04:12 lmllml

You have removeClippedSubviews in your props twice, but I doubt that's causing any problems. The code looks good to me.

Outside of the rendering bug, did SGListView solve your memory problems?

Interested to hear your findings.

sghiassy avatar Dec 02 '15 00:12 sghiassy