Skip to content

BoundForm Improvements

Compare
Choose a tag to compare
@aaronpanch aaronpanch released this 13 Feb 19:32
· 3117 commits to master since this release

This release improves the way BoundForm passes its underlying object to child FormRows. A new component, BoundFormRow should be used within BoundForms which reads the context provided by the form.

For example, the old way didn't allow:

<BoundForm object={...}>
  <div>
    <FormRow name="firstName" /> // Props aren't passed to non-immediate children
  </div>
</BoundForm>

And the new way:

<BoundForm object={...}>
  <div>
    <BoundFormRow name="firstName" /> // Now it works-- by reading the context provided!
  </div>
</BoundForm>

View the full diff here.