Skip to content
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

Reorder with animation #143

Open
obetomuniz opened this issue Mar 22, 2018 · 8 comments
Open

Reorder with animation #143

obetomuniz opened this issue Mar 22, 2018 · 8 comments

Comments

@obetomuniz
Copy link

Is it possible add animation when I update order property value?

I want to aniamate from [0,1,2] to [2,0,1].

@ilonashub
Copy link

@obetomuniz did you manage to make it work? I need the same functionality... thanks :)

@obetomuniz
Copy link
Author

Hey @ilonashub. Sadly I did not. I used this library to solve my problem

@nihgwu
Copy link
Collaborator

nihgwu commented Apr 11, 2018

I think use can config LayoutAnimation right before you set the new state, I don't test it.

@ilonashub
Copy link

ilonashub commented Apr 11, 2018

@obetomuniz thanks! that's the library I am trying to use as well, just having some flickering issues there.

@nihgwu we use LayoutAnimation today - but it works only on iOS

@nihgwu
Copy link
Collaborator

nihgwu commented Apr 11, 2018

@ilonashub for Android you need add this line UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); at the very beginning

@ilonashub
Copy link

@nihgwu thanks! I know - we have this line and we use LayoutAnimation in Android in many places - but specifically the swapping that works for lists with LayoutAnimation works on iOS and not Android

@nihgwu
Copy link
Collaborator

nihgwu commented Apr 11, 2018

LayoutAnimation.easyInOut is only effective for the next state change, I suspect there is other render consumed that, if the RNTester's LayoutAnimation example works for you then I think it should work on this scenario too

@ilonashub
Copy link

@nihgwu now that I think about it.. maybe the order of renders is different between Android and iOS - and what you're saying might be the problem. I'll check that direction. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants