如何正确使用NavigationCardStack的方向道具

时间:2022-06-02 20:56:49

How to use NavigationCardStack's direction prop properly? (RN v0.30.0) I'm setting the prop currently via

如何正确使用NavigationCardStack的方向道具? (RN v0.30.0)我正在通过当前设置道具

const direction = navigationState.routes[navigationState.index].direction || 'horizontal';

It works when navigating forward, however when navigating backward, it's always the current active scene's direction instead of the previous scene

它在向前导航时起作用,但是当向后导航时,它总是当前活动场景的方向而不是前一个场景

1 个解决方案

#1


0  

The NavigationCardStack does not support setting the direction for every card in the stack.

NavigationCardStack不支持为堆栈中的每张卡设置方向。

A pull request has been made here.

此处已提出拉取请求。

#1


0  

The NavigationCardStack does not support setting the direction for every card in the stack.

NavigationCardStack不支持为堆栈中的每张卡设置方向。

A pull request has been made here.

此处已提出拉取请求。