callstack / callstack/react-native-paper
Menu + Navigation is not clearing the PortalManager
- 主要语言
- TypeScript
- 星标
- 14.5k
- 派生
- 2.2k
- 平均合并
- 5 天 23 小时
- 30 天内合并 PR
- 12
描述
I am running into an issue that if a navigate on a menu item press, the PortalManager is not getting cleared out and then capturing subsequent screen interactions. I am doing some pretty simple navigation using the following code:
```jsx
const closeMenu = () => {
console.log('closeMenu');
setVisible(false);
};
const navigateToStaticWebView = (itemKey: string) => {
navigation.push('StaticWeb', {
...webViews[itemKey as keyof typeof webViews],
});
};
```
And here is the menu item that is calling it:
```jsx
{
closeMenu();
navigateToStaticWebView('about');
}}
/>
```
I figure that I am just doing something dumb or missing something simple, but this has been throwing me for a loop for a few days. Any help or documentation would be greatly appreciated, thanks.
贡献指南
调研方向
首先复现提供的 Menu.Item 流程:调用 closeMenu,然后使用 navigation.push 调用 navigateToStaticWebView,并观察 PortalManager 是否仍会捕获屏幕交互。跟踪导航期间 Menu 和 PortalManager 的行为;当从菜单进行导航会清除 PortalManager,使后续的屏幕交互到达目标屏幕时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native, typescript
- 领域
- frontend, mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100