callstack / callstack/react-native-paper

Allow BottomNavigation to have items unselected

Đang mở
#4,651 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
BottomNavigation feature request
Ngôn ngữ chính
TypeScript
Star
14.5k
Fork
2.2k
Merge trung bình
5 ngày 23 giờ
Pull request đã merge (30 ngày)
12

Mô tả

**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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xác định component BottomNavigation và theo dõi cách trạng thái điều hướng xác định mục được chọn. Xác minh hành vi mong đợi đối với các chỉ mục âm hoặc nằm ngoài phạm vi, đồng thời bổ sung coverage cùng với các bài kiểm thử hiện có của component. Được xem là hoàn tất khi một route nằm ngoài các mục của BottomNavigation khiến mọi mục đều không được chọn mà không thay đổi hành vi chọn thông thường.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
react-native, typescript
Lĩnh vực
frontend, mobile
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.