Open aksonov opened 8 years ago
@hedgerwang has an upcoming way to do this. Hedger, can we be sure to add it to the docs?
@ericvicenti : I'll do that once my latest diff lands.
Any update?
@5amfung
You can disable the gesture by doing this.
<NavigationCard panHandlers={null} />
Any chance we could get panHandlers={null} to transfer to the NavigationCard when using a NavigationCardStack?
@jarredwitt That sounds reasonable. Feel free to send a PR and tag me and/or Hedger
@ericvicenti Will do. I also noticed that NavigationCard doesn't take the direction prop anymore. Was that intentional?
@jarredwitt:
NavigationCardStack
is primarily a simple component with canned "built-in" animation and gestures.
The prop direction direction
says that you can decide how the transition and gesture should be handled with just one property.
However, once you start to let people "customize" this component, the prop "direction" may not make sense at all cause it not not necessarily match to what the animation style and gesture pan-handlers are doing.
To be honest, I'm seriously considering removing NavigationCardStack and NavigationCard from the source code otherwise we'd end up with a component with countless of "customization" props that can't be defined stickily without contradicts to one or another.
We've made such mistake with Navigator
by allowing people adding random APIs to it instead of provide proper building blocks.
My advice of the replacement of NavigationCardStack
will be just like this:
<NavigationAnimatedView
navigationState={navigationState}
renderOverlay={renderOverlay}
renderScene={renderScene}
/>
Could i disable swipe for NavigationCard?