react-native-swipe-list-view
react-native-swipe-list-view copied to clipboard
How to avoid swiping lag effect when calling setList() ?
I'm trying to mimic something equivalent to the sample "SwipeToDelete.js", the issue occurs even with the provided sample. When you try to swipe fast several rows, you face a lag effect that happens when "setList(data)" is called to refresh the list and re-render items. It is not related to the swipe component but how can I avoid that ? I have to display an icon each time the user swipes on a row but it is really laggy when you want to swipe the next row while setList is rendering.
To Reproduce Use the sample called SwipeToDelete, add 50 items and swipe quickly, it's barely impossible to delete 10 rows quickly like you would do with your mails in gmail app for example.
Environment (please complete the following information):
- OS: iOS
- RNSLV Version: 3.2.6
- RN Version: v63
I have tried to delay the call in a timer but as soon as setList() is called, if there is any swipe event occurring at the same time, it is blocked..
How do you guys solved this kind of problem ?
Thanks for any answer
Sami
@dngconsulting Maybe it's because I'm on a simulator but I'm not really seeing the issue you've described. Any chance you could send a demo video and maybe some example code?