Skip to content

TextInput value can't be change during onChangeText [iOS] #18874

Closed
@jerameel

Description

@jerameel

TextInput's value property does not seem to get in sync when changing state via onChangeText.

An example use case would be blocking non numerical characters from the input.

This works on Android though.

Environment

OS: macOS High Sierra 10.13.3
Node: 8.10.0
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.1 AI-173.4697961

react: ^16.3.0-alpha.1 => 16.3.0-rc.0
react-native: 0.54.3 => 0.54.3

Expected Behavior

TextInput value should be equal to state value even when it is modified during onChangeText.

Actual Behavior

TextInput value is not being modified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: TextInputRelated to the TextInput component.Impact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.Platform: iOSiOS applications.Resolution: FixedA PR that fixes this issue has been merged.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions