callstack / callstack/react-native-paper
How to have a label and a placeholder on a textinput at the same time
- Langage dominant
- TypeScript
- Étoiles
- 14.5k
- Forks
- 2.2k
- Merge moyen
- 5 j 23 h
- PR mergées (30 j)
- 12
Description
### Ask your Question
If you have both a `label` and a `placeholder` prop at the same time, then on initial render, the label will show but then the placeholder doesnt show until the input is focused like so:
https://github.com/callstack/react-native-paper/assets/56619430/7a23d59d-b705-461f-ab4a-43636b12b904
is there a way to have both the label and the placeholder exist at the same time even when the input isnt focused. in other words, is there a way to make the text input always look like this with the label at the top?

Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le point d’entrée du composant TextInput et par la gestion des props label et placeholder. Reproduisez l’état initial sans focus décrit dans l’issue, puis consultez les tests existants ou la documentation sur le comportement de TextInput. C’est terminé lorsque le label reste en haut et que le placeholder est également visible avant le focus, avec le comportement attendu couvert par un test.
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é
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 25/100