mirror of https://github.com/embarklabs/embark.git
fix: pressing enter on "Display additional results" does the expected thing
This commit is contained in:
parent
5816a79ae6
commit
2cc0d305e6
|
@ -20,10 +20,15 @@ class Console extends Component {
|
|||
}
|
||||
|
||||
handleSubmit(event) {
|
||||
const instance = this.typeahead.getInstance();
|
||||
if(instance.state.selected.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
this.props.postCommand(this.state.value);
|
||||
this.setState({value: ''});
|
||||
this.typeahead.getInstance().clear();
|
||||
instance.clear();
|
||||
}
|
||||
|
||||
handleChange(value, cb) {
|
||||
|
|
Loading…
Reference in New Issue