TextInput briefly displays restricted characters before validation removes them when using onChangeText
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた Snack 再現コードから始め、React Native 0.76.0 を使用して Android と iOS の両方でちらつきを確認します。次に、onChangeText に対する TextInput の処理を特定し、バリデーションの更新がネイティブのテキストフィールドにどのように反映されるかを追跡します。影響を受けるプラットフォームで、制限された文字がバリデーションによって削除される前に一瞬表示されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100