|
@ -49,7 +49,7 @@ const ComposeForm = React.createClass({ |
|
|
this.props.onChange(e.target.value); |
|
|
this.props.onChange(e.target.value); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
handleKeyUp (e) { |
|
|
|
|
|
|
|
|
handleKeyDown (e) { |
|
|
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { |
|
|
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { |
|
|
this.props.onSubmit(); |
|
|
this.props.onSubmit(); |
|
|
} |
|
|
} |
|
@ -115,7 +115,7 @@ const ComposeForm = React.createClass({ |
|
|
value={this.props.text} |
|
|
value={this.props.text} |
|
|
onChange={this.handleChange} |
|
|
onChange={this.handleChange} |
|
|
suggestions={this.props.suggestions} |
|
|
suggestions={this.props.suggestions} |
|
|
onKeyUp={this.handleKeyUp} |
|
|
|
|
|
|
|
|
onKeyDown={this.handleKeyDown} |
|
|
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} |
|
|
onSuggestionsFetchRequested={this.onSuggestionsFetchRequested} |
|
|
onSuggestionsClearRequested={this.onSuggestionsClearRequested} |
|
|
onSuggestionsClearRequested={this.onSuggestionsClearRequested} |
|
|
onSuggestionSelected={this.onSuggestionSelected} |
|
|
onSuggestionSelected={this.onSuggestionSelected} |
|
|