-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 #81
V2 #81
Conversation
Ok because I'm too curious and couldn't leave well enough alone, I simplified the test more to just be color blocks of text, and I'm still having the issues: The list code looks like:
The render function:
And then piece by piece I ripped everything out of the app and brought this up to the top level, surrounded only by a container view of I'm going to have to cut off the investigation here, but for reference, here are the relevant library versions I am using: react-native 0.61.4 |
@lafiosca thanks so much for the example! I can repro on my end now, but only when I do not set state on drag end. This wasn't a use case I was planning for, since usually you want to update your list data in response to the drag, but agree it's definitely a bug. I will look into it — I'm hoping it's as easy as forcing a rerender on drag end, whether Can you verify that it works when you set new data in |
@lafiosca should be fixed in 2.0.2. Thanks! |
Oh and I should probably make the docs more clear, but if you are not setting updated data as your data source after a drag, your list will jump back to its original position. In other words -- the component tells you what happened as a result of the drag, but you are responsible for updating the data source. Usually it's as simple as |
Glad that helped. I was definitely assuming the latter and intended on wiring up the data update later, just didn’t expect the lack of updating during my trial to cause a bug. There was also the separate problem with something in the full-blown version of my app conflicting with the smooth item animations and positioning, but I’m probably not going to have time to dig in on that. |
Fix list cut
proc
to see the full perf improvement, which has not been released as of this writing Add support for nodes as functions software-mansion/react-native-reanimated#354.