question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Merging passed initialValues from the schema and from props

See original GitHub issue

I know that the initialValues passed to the FormRender component have a higher priority. However, if this attribute is set on the component, it ignores any initialValue attributes defined on the field level in the schema, even those which aren’t set on the component level.

I discussed this with @rvsia and he said this is a bug, the two levels should be merged with the component level as priority.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
skatemancommented, Feb 28, 2020

Wednesday the soonest, but sure. It’s a tough one …

0reactions
Hyperkid123commented, Mar 20, 2020

@skateman closing this seems like the issue was on the MIQ side. Feel free to re-open this issue if you disagree.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Formik setFieldValue Inside a Function - Stack Overflow
So you're basically setting up all your form props in the function ... initialValues={initialValues} validationSchema={validationSchema} ...
Read more >
Other Internals - react-jsonschema-form documentation
Merging of defaults within the schema¶. In the schema itself, defaults of parent elements are propagated into children. So when you have a...
Read more >
useForm | React Hook Form - Simple React forms validation
The values props will react to changes and update the form values, which is useful when your ... defaultValues will not be merged...
Read more >
Initial Value Templates - Sanity.io
Initial values can be used on any schema type. ... The callback function is invoked with the current value and a context object...
Read more >
How to Create Forms in React using react-hook-form
react-hook-form integrates well with the yup library for schema validation so you can combine your own validation schemas. Mounting time is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found