-
Notifications
You must be signed in to change notification settings - Fork 47.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with event.target.value for input with fixed value #2444
Comments
This is correct and by design, by updating the value of input with http://facebook.github.io/react/docs/forms.html#controlled-components |
Sorry to bother you one more time. The input value in the example above is fixed for all times ( |
@menelaos No problem.
You never update the value and thus it appears read-only/fixed. A read-only/fixed input field is a side-effect of a controlled component that has a fixed value. Read the link I posted and it might become clearer: PS. If you want a read-only input then set the |
Check the following example:
The first div's content will either read "fixe" (on backspace) or "fixed{lastKeyPressed}".
Intuitively, it should always read "fixed".
The text was updated successfully, but these errors were encountered: