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
I have tried to solve #13 with adding defaultValue: '' to every not null field, but to my surprise it forced those fields to be null, even if there was data in the input for the field.
The name defaultValue implies to set the value when none was present - either the field is new (not in the input) OR the input field is there, but its value is NULL).
defaultValue is better named setValue, constantValue or simply value, as it is replacing the value unconditionally with the one specified.
Probably it is worth having both value and defaultValue as they are used in different situations.
The text was updated successfully, but these errors were encountered:
I have tried to solve #13 with adding
defaultValue: ''
to every not null field, but to my surprise it forced those fields to be null, even if there was data in the input for the field.The name
defaultValue
implies to set the value when none was present - either the field is new (not in the input) OR the input field is there, but its value is NULL).defaultValue
is better namedsetValue
,constantValue
or simplyvalue
, as it is replacing the value unconditionally with the one specified.Probably it is worth having both
value
anddefaultValue
as they are used in different situations.The text was updated successfully, but these errors were encountered: