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

direction='vertical' doesn't work? #2299

Closed
TalkTek opened this issue Aug 29, 2017 · 4 comments
Closed

direction='vertical' doesn't work? #2299

TalkTek opened this issue Aug 29, 2017 · 4 comments

Comments

@TalkTek
Copy link

TalkTek commented Aug 29, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.17
  • react-native v0.44.0

Expected behaviour

pop out the screen from bottom to top

Actual behaviour

pop out the screen from left to right

I have checked breaking news and example

but it seems direction='vertical' is not active

<Router createReducer={reducerCreate} tintColor='white'>
  <Scene overlay>
    <Scene
       key='popOutBar'
       component={PopOutBar}
    />
    <Scene key='modal' modal hideNavBar initial>
      <Scene  key='root'  hideNavBar hideTabBar initial>
        <Scene key='launch' component={Launch} initial hideNavBar hideTabBar />
        <Scene key='play' direction='vertical'>
          <Scene key='audio' component={PlayAudioScreen} />
        </Scene>
        <Scene key='login' component={Login} hideNavBar />
        ...

Would be grateful if someone can help me out on this

@aksonov
Copy link
Owner

aksonov commented Aug 29, 2017

It is breaking change - you have to use 'modal' prop for such animation (as container prop)

@TalkTek
Copy link
Author

TalkTek commented Aug 29, 2017

thanks for the reply.
I added the modal prop into my root Scene, like this

<Router createReducer={reducerCreate} tintColor='white'>
  <Scene overlay>
    <Scene
       key='popOutBar'
       component={PopOutBar}
    />
    <Scene key='modal' hideNavBar initial>
      <Scene  key='root'  hideNavBar hideTabBar initial modal> // <-----here
        <Scene key='launch' component={Launch} initial hideNavBar hideTabBar />
        <Scene key='play' direction='vertical'>
          <Scene key='audio' component={PlayAudioScreen} />
        </Scene>
        <Scene key='login' component={Login} hideNavBar />
        ...

I noticed that every screen coming out at bottom, but that is not I want.
I just want one screen popped out at the bottom, not every screen.
so I tried another case, like this

<Router createReducer={reducerCreate} tintColor='white'>
  <Scene overlay>
    <Scene
       key='popOutBar'
       component={PopOutBar}
    />
    <Scene key='modal' modal hideNavBar initial>
      <Scene  key='root'  hideNavBar hideTabBar initial>
        <Scene key='launch' component={Launch} initial hideNavBar hideTabBar />
        <Scene key='play' direction='vertical' modal> // <--------here
          <Scene key='audio' component={PlayAudioScreen} /> // <----the only screen that I hope it can pop out at bottom 
        </Scene>                                                                         
        <Scene key='login' component={Login} hideNavBar />
        ...

It doesn't work either.
Could you please help me?

@varun-raj
Copy link

Where is the documentation for breaking change?

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