Skip to content

Fix of uncontrolled input#1532

Open
xuaveneg wants to merge 1 commit into
klee-contrib:developfrom
xuaveneg:patch-2
Open

Fix of uncontrolled input#1532
xuaveneg wants to merge 1 commit into
klee-contrib:developfrom
xuaveneg:patch-2

Conversation

@xuaveneg
Copy link
Copy Markdown
Contributor

When undefined is passed as the checked props of the input, this one is considered as uncontrolled, and an uncontrolled component sometimes cannot change its value via React, resulting in an input which changes cannot be controlled by focus. Passing '' instead of undefined fix this error.

When ```undefined``` is passed as the ```checked``` props of the input, this one is considered as uncontrolled, and an uncontrolled component sometimes cannot change its value via React, resulting in an input which changes cannot be controlled by focus. Passing ```''``` instead of ```undefined``` fix this error.
@Hartorn
Copy link
Copy Markdown
Contributor

Hartorn commented Dec 13, 2017

@xuaveneg Could you test with true false instead of checked undefined ?

@xuaveneg
Copy link
Copy Markdown
Contributor Author

Just tested, it works with true false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants