Skip to content

nicholasgonzalezsc/react-bootstrap-controlled-to-uncontrolled-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Bootstrap Controlled To Uncontrolled Bug

When a value of undefined is passed to an input, the previous value is still shown. For example, if I view one item with field "name" = "hello" and then open a new item without field "name", the input will keep showing "hello," even if though the value passed to value was undefined.

To fix this requires having default values throughout the code, through ternary statements, the data model, or a wrapper around the input. The problem with this is that then you have to maintain all of these extra default values, and eventually remove them from items that would otherwise not have the default value fields saved on them.

reactbootstrapundefined

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages