function init(React){ var Filter = React.createClass({ dealChange:function(){ var self = this, userInput = React.findDOMNode(self.refs.keywordInput).value; self.props.onChangeKeyword && self.props.onChangeKeyword.call(null,userInput); }, setFocus:function(){ var self = this; React.findDOMNode(self.refs.keywordInput).focus(); }, componentDidUpdate:function(){ this.setFocus(); }, render:function(){ var self = this; return (