[TextInput] input cannot be controlled
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
TextInput value cannot be controlled. Given the following JSX, I expected that typing in the input would do nothing to match behaviour on web:
<TextInput value="" />
Actual behaviour
The value typed by the user flickers on screen before being removed.
https://user-images.githubusercontent.com/175330/185148394-c13e74b7-1319-4948-ae1c-38968a651aa7.MP4
Version
0.70.0-rc.2
Output of npx react-native info
System:
OS: macOS 12.5
CPU: (10) arm64 Apple M1 Max
Memory: 108.61 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.7.0 - /usr/local/bin/node
Yarn: Not Found
npm: 8.15.0 - /usr/local/bin/npm
Watchman: 2022.08.15.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
- Open snack at https://snack.expo.dev/YtYVsPnOU
- Click iOS (or Android, although it's more intermittent there)
- Type in the input and note that your value flickers in before being removed
Snack, code example, screenshot, or link to a repository
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Snackでの再現と、iOSおよびAndroidにおけるTextInputの制御値の挙動から始めます。value="" の状態で入力すると、削除される前に一瞬ちらつくことを確認し、次に関連するTextInputの実装を追跡して、期待される制御入力の挙動に対するテストカバレッジを追加します。どちらのプラットフォームでも入力したテキストが一瞬表示されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100