Update 09.2-form-input-binding-sugar.md -> better checkedLink documentation
Sébastien Lorber committed
Jul 30, 2014 at 11:17 UTC
d0d15a3a3c7fe1a4d91eed25c518af0ea82634cc
1 file changed
+2
-2
docs/docs/09.2-form-input-binding-sugar.md
+2
-2
@@ -66,9 +66,9 @@ var WithLink = React.createClass({
66
67
`ReactLink` objects can be passed up and down the tree as props, so it's easy (and explicit) to set up two-way binding between a component deep in the hierarchy and state that lives higher in the hierarchy.
68
69
-Note that `<input>` supports ReactLink for both `value` and `checked`. For checkboxes, you should use `checkedLink` instead of `valueLink`, as their value is fixed to `on`:
69
+Note that checkboxes have a special behavior regarding their `value` attribute, which is the value that will be sent on form submit if the checkbox is checked (defaults to `on`). The `value` attribute is not updated when the checkbox is checked or unchecked. For checkboxes, you should use `checkedLink` instead of `valueLink`:
70
```
71
-<input type="checkbox" checkedLink=valueLink={this.linkState('booleanValue')} />
71
+<input type="checkbox" checkedLink={this.linkState('booleanValue')} />
72
```
73
74