Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Warning: A component is changing an uncontrolled input of type text to be controlled #198

Open
FluidSense opened this issue Nov 8, 2020 · 0 comments
Labels
Bug Something that just ain't right Component: TextField

Comments

@FluidSense
Copy link
Contributor

Describe the bug
When using a TextField, I get the warning:

Warning: A component is changing an uncontrolled input of type text to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://fb.me/react-controlled-components

If I change to not controlling it with a value, the input is never displayed and the onChange triggers with only 1 letter at a time instead of concatinating the input every time.

Expected behavior
Either displaying input iteratively and always returning the entire state of the input field on onChange, or just let me control it without warnings.

@FluidSense FluidSense added Bug Something that just ain't right Component: TextField labels Nov 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something that just ain't right Component: TextField
Projects
None yet
Development

No branches or pull requests

1 participant