Closed benjamingeorge closed 1 year ago
Have the same problem. Does anyone have any thoughts on it?
I noticed you forgot to define the account
field in then fields
array.
I tested this with the correct field definition and worked (without null values).
Related #531
:tada: This issue has been resolved in version 5.5.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I recently updated to the latest version of this library and noticed a new bug where my form
isDirty = true
on initialization. I set values on my form that come back from an API response. Sometimes that value object has a nested object where some properties arenull
. When they are, MobxReactForm marks the form dirty on form initialization. But if those nested values are any other type (string
,boolean
,number
) the form is not marked as dirty. It seems to be only a problem with nested values of typenull
. Top level values ofnull
do not seem to be a problem, only nested ones.Below is an example of the bug. See in the values object, the
account: { id: null }
causes the form to beisDirty = true
on initialization which is a bug. If you change it toaccount: { id: "123" }
or evenaccount: { id: "" }
, we getisDirty = false
on initialization which is correct .