@samitouri / QOS-React / commits / 772468183f

Add note on how to submit a form (#6594)

Simen Bekkhus committed Apr 28, 2016 at 17:42 UTC 772468183f66de15d02de6e29772808c33d61545
1 file changed +5
docs/docs/07-forms.md
+5
@@ -166,3 +166,8 @@ To make an uncontrolled component, `defaultValue` is used instead.
166 > Note:
167 >
168 > You can pass an array into the `value` attribute, allowing you to select multiple options in a `select` tag: `<select multiple={true} value={['B', 'C']}>`.
169 +
170 +### Imperative operations
171 +
172 +If you need to imperatively perform an operation, you have to obtain a [reference to the DOM node](/react/docs/more-about-refs.html#the-ref-callback-attribute).
173 +For instance, if you want to imperatively submit a form, one approach would be to attach a `ref` to the `form` element and manually call `form.submit()`.