callstack / callstack/react-native-paper
Allow BottomNavigation to have items unselected
- Langage dominant
- TypeScript
- Étoiles
- 14.5k
- Forks
- 2.2k
- Merge moyen
- 5 j 23 h
- PR mergées (30 j)
- 12
Description
**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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par localiser le composant BottomNavigation et suivre la manière dont l’état de navigation détermine l’élément sélectionné. Vérifiez le comportement attendu pour les indices négatifs ou hors limites et ajoutez une couverture de tests aux côtés des tests existants du composant. Le travail est terminé lorsqu’une route en dehors des éléments de BottomNavigation laisse tous les éléments non sélectionnés sans modifier le comportement normal de sélection.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- react-native, typescript
- Domaine
- frontend, mobile
- Type d'issue
- Fonctionnalité
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100