Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

createDefaultObject doesn't dive into groups #669

Open
GhostKnight opened this issue Apr 6, 2020 · 0 comments
Open

createDefaultObject doesn't dive into groups #669

GhostKnight opened this issue Apr 6, 2020 · 0 comments

Comments

@GhostKnight
Copy link

Noticed that my default values in my groups weren't getting set correctly when the default object is being created.

Current source:
image

Workaround:
Updated my code to do the following and it solved the issue -

let defaultModel = VueFormGenerator.schema.createDefaultObject(this.formSchema);
merge(this.model, defaultModel)
each(this.formSchema.groups, group => {
  defaultModel = VueFormGenerator.schema.createDefaultObject(group);
  merge(this.model, defaultModel);
}

I am writing this issue mainly as a question to the owners if they intended this case to be handled natively and if so, raise awareness. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant