mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 06:16:01 +00:00
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…
x
Reference in New Issue
Block a user