Skip to content

Commit 3fa2596

Browse files
committed
Correctly document required properties
1 parent 4352d1f commit 3fa2596

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Widget extends React.Component {
7171
| `nodes` | array | **Required**. Specifies the tree nodes and their children. |
7272
| `checked` | array | **Required**. An array of checked node values. |
7373
| `expanded` | array | **Required**. An array of expanded node values. |
74-
| `onCheck` | function | onCheck handler: `function(checked) {}` |
75-
| `onExpand` | function | onExpand handler: `function(expanded) {}` |
74+
| `onCheck` | function | **Required**. onCheck handler: `function(checked) {}` |
75+
| `onExpand` | function | **Required**. onExpand handler: `function(expanded) {}` |
7676
| `name` | string | Optional name for the hidden `<input>` element. |
7777
| `nameAsArray` | bool | If true, the hidden `<input>` will encode its values as an array rather than a joined string. |

src/js/Tree.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import nodeShape from './nodeShape';
55

66
class Tree extends React.Component {
77
static propTypes = {
8+
checked: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
9+
expanded: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
810
onCheck: React.PropTypes.func.isRequired,
911
onExpand: React.PropTypes.func.isRequired,
1012

11-
checked: React.PropTypes.arrayOf(React.PropTypes.string),
12-
expanded: React.PropTypes.arrayOf(React.PropTypes.string),
1313
name: React.PropTypes.string,
1414
nameAsArray: React.PropTypes.bool,
1515
nodes: React.PropTypes.arrayOf(

0 commit comments

Comments
 (0)