var SearchableList React createClass getDefaultProps function return i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var SearchableList = React.createClass({
getDefaultProps: function() {
return {
items: new Array()
};
},
componentDidMount: function() {
},
render() {
var obj = <div className="searchableList">
<div className="filterFieldWrapper">
<label className="fieldLabel">Filter:</label> <input type="text" className="textField"/>
</div>
<div className="items">
<ol className="list">
{this.props.items.map(function(item, i) {
return <li className="item">{item}</li>;
})}
</ol>
</div>
<div className="controls"></div>
</div>;
return obj;
}
});