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

Tab screens have no sliding animation #3170

Closed
SourceCipher opened this issue Aug 11, 2018 · 8 comments
Closed

Tab screens have no sliding animation #3170

SourceCipher opened this issue Aug 11, 2018 · 8 comments

Comments

@SourceCipher
Copy link

SourceCipher commented Aug 11, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux4 .0.0-beta.40
  • react-native 0.55.4

Expected behaviour

Calling the tab screen from the tabs component (or any other) with the Actions.jump('key') should slide to that screen with the sliding animation

Actual behaviour

Instead of sliding with the animation it will instantly jump to the screen. Even if im on the initial screen with the tabs and press on my custom header profile button, it will jump to the tab without animation. And then pressing on another icon to go back to the middle tab by Actions.pop('key') will slide back to the initial tab with the animation.

Code

My scene structure:

 <Scene key="tabbar" tabs={true} tabBarPosition='top' tabBarComponent={() => null} hideNavBar >
   <Tabs key="contacts" component={Contacts} hideNavBar />
   <Tabs key="chats" component={Chats} hideNavBar initial={true} />
   <Tabs key="profile" component={Profile} hideNavBar />
</Scene>

Calling from my custom header onPress={() => Actions.jump('_profile')} will switch to the profile tab without any animation

@daviscabral
Copy link
Collaborator

Could you update to the most recent version and see if it works with your app and fix this issue?

@aksonov
Copy link
Owner

aksonov commented Sep 5, 2018

@daviscabral Just verified that it works (latest master, github:aksonv/react-native-router-flux#master) with addition of legacy attribute to Tabs. But I don't see tab bar anymore, is it intended?

@aksonov
Copy link
Owner

aksonov commented Sep 5, 2018

Duplicate of #3163

@aksonov aksonov marked this as a duplicate of #3163 Sep 5, 2018
@aksonov aksonov closed this as completed Sep 5, 2018
@daviscabral
Copy link
Collaborator

@aksonov not sure if I understand - it is not showing the tab bar at all?

@daviscabral
Copy link
Collaborator

I got it now - it was not the intention.

@mog3n
Copy link

mog3n commented Sep 12, 2018

@SourceCipher @aksonov were you able to get it working? I have the same problem as you- when a call Actions.jump('key'), it does not seem to animate (transition left/right) to the appropriate tab.

Screen shot of code: https://imgur.com/bJ5oGiy

Video of problem: https://media.giphy.com/media/5e21EuevXL8hS6AAyI/giphy.gif

`

                <Scene title="messages" icon={Icon}>
                    <Scene  key="chat" initial component={Chats}/>
                    <Scene key="chatDetail" component={ChatScreen} />
                </Scene>

                <Scene key="home" title="home" icon={Icon} initial component={Home} />

                <Scene title="me" icon={Icon}>
                    <Scene key="profile" initial component={Profile} />
                    <Scene key="editBio" component={EditBio} />
                </Scene>

            </Scene>`

In the Scene home, I'm able to swipe left and right (using my finger) to transition between screens, but when I call the function Actions.jump('messages'), it does not show the sliding transition. Is there something wrong with my code?

@aksonov
Copy link
Owner

aksonov commented Sep 12, 2018

@daviscabral Could you fix tabbar for legacy before releasing of new version?

@aksonov
Copy link
Owner

aksonov commented Sep 12, 2018

@mog3n You have to use latest master and legacy param for tabs scene. But now it works without tabbar...

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

No branches or pull requests

4 participants