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
When a form mounts with this schema, I expect the list field to be already populated with one element, with the title field filled. The model should also contain this data immediately, and not after editing the form first.
Currently, this defaultValue has no effect, and the array is initialized as empty.
The text was updated successfully, but these errors were encountered:
I've checked the behavior that you have described and it seems like there is a problem with logic in the bridge.
JSON Schema bridge seems to return defaultValue right away and returns undefined as a fallback, whereas in SimpleSchemadefaultValue is returned as a fallback - in this case the code follows the type === Object path and returns an empty object.
@radekmie Do you know if there is any exact reason for this inconsistency or is this simply an oversight? If it's an oversight, I will create a fix for this.
When you set a
defaultValue
in anArray
field with SimpleSchema, the initial model doesn't properly reflect it:When a form mounts with this schema, I expect the
list
field to be already populated with one element, with thetitle
field filled. The model should also contain this data immediately, and not after editing the form first.Currently, this
defaultValue
has no effect, and the array is initialized as empty.The text was updated successfully, but these errors were encountered: