callstack / callstack/react-native-paper

Allow BottomNavigation to have items unselected

未关闭
#4,651 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
BottomNavigation feature request
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
There is the use case where it would make sense that if you are using the BottomNavigation component together with a top navigation component that will open a drawer with multiple menu items, when one of the items selected from the drawer is not also part of the BottomNavigation menu items to have no menu item selected in the bottom navigation component.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
We could check the index of the navigation state, if it is either negative or greater than the routes length, we do not set focus . Then developers can pass either if the user navigates to a different menu that is not part of the bottom navigation.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

Material UI seem to support inactive states as per https://m2.material.io/components/bottom-navigation#states

贡献指南

打开贡献指南

调研方向

首先定位 BottomNavigation 组件,并跟踪导航状态如何确定选中的项目。验证负索引或超出范围的索引的预期行为,并在该组件现有测试旁补充覆盖测试。完成的标准是:位于底部导航项目之外的路由会使所有项目均处于未选中状态,同时不改变正常的选择行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
frontend, mobile
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。