callstack / callstack/react-native-pager-view
onPageSelected called automatically when navigate to other screen and detachInactiveScreens is false
未关闭
- 主要语言
- TypeScript
- 星标
- 3.4k
- 派生
- 476
- 平均合并
- 10 天 21 小时
- 30 天内合并 PR
- 2
描述
## Environment
`"react": "17.0.2",`
`"react-native": "0.66.2"`
`"react-native-pager-view": "^6.0.0-rc.0"`
`"@react-navigation/native": "^6.0.6"`
## Description
disable the `detachInactiveScreens` and navigate to other screen and after came back the page is set to zero onPageSelected event is called every time when I navigate to other screen. Event is working fine when `detachInactiveScreens` is true.
贡献指南
调研方向
使用 React Native 0.66.2、react-native-pager-view 6.0.0-rc.0,并将 detachInactiveScreens 设置为 false,复现导航流程。在离开屏幕并返回屏幕的过程中跟踪 pager 的 onPageSelected 入口点,然后验证导航不会重置页面或意外发出该事件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100