You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Controlled inputs do not synchronize value or checked attribute
This commit is a follow up to prior work to resolve issues with number
inputs in React. Inputs keep their value/checked attribute in sync with the
value/checked property. This is a React behavior. Traditionally
browser DOM manipulation does not rely on keeping the value/checked
attribute in sync.
It's also very problematic for number inputs. After discussion, it was
decided to make a breaking change to no longer sync up the
value/checked attribute with it's assoicated property.
For this to work, I made the following changes:
- The value, defaultValue, checked and defaultChecked properties are
now maintained within the HTML property config.
- This required adding a filter to strip out the value property on
selects and textareas
- The logic to defer assignment of the value attribute has been
removed form ChangeEventPlugin
- defaultValue and defaultChecked are aliased to `value` and `checked`
so that uncontrolled input attribute assignment works as intended.
0 commit comments