Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

React Redux Form v1.3.2

Compare
Choose a tag to compare
@davidkpiano davidkpiano released this 04 Dec 18:39
· 530 commits to master since this release

New Prop: getRef

Issue #555 pointed out that refs weren't easy to get, so the getRef={() => ...} prop alleviates that. From the FAQs:


How do I get the component instance? ref={...} doesn't work.

Use getRef={(node) => ...} in place of ref. This is due to the fact that React treats the ref prop as a "magic" prop that doesn't get propagated down through wrapped components.

You can use getRef on <Field>, <Control>, <Form>, or <LocalForm> components.

(since: version 1.3.2)

<Control.text
  model="user.name"
  getRef={(node) => this.attach(node)}
/>