TextInput briefly displays restricted characters before validation removes them when using onChangeText
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.3k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
Description
Hi there,
Just wanted to bring up an issue that many of us have come across. When using TextInput with validation in onChangeText, restricted text still flashes for a moment before it gets removed. This is a pretty common need in apps, where real-time validation is used to guide user input (like blocking specific characters or setting a format). But right now, seeing those restricted characters pop up briefly makes the input feel a bit off.
There are many Workarounds and hacks for this but don’t quite fix the experience entirely. Is there any chance this could be smoothed out natively in the future?
Steps to reproduce
React Native Version
0.76.0
Affected Platforms
Runtime - Android, Runtime - iOS
Output of npx react-native info
Not needed
Stacktrace or Logs
Not needed
Reproducer
https://snack.expo.dev/fVO2DXQPPqQVlm9QBZ2ms
Screenshots and Videos
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem verlinkten Snack-Reproducer und überprüfe das Flackern sowohl auf Android als auch auf iOS mit React Native 0.76.0. Suche dann die TextInput-Verarbeitung für onChangeText und verfolge, wie Validierungsaktualisierungen im nativen Textfeld widergespiegelt werden. Als erledigt gilt die Aufgabe, wenn eingeschränkte Zeichen auf den betroffenen Plattformen nicht mehr kurz erscheinen, bevor sie durch die Validierung entfernt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native
- Bereich
- mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100