Skip to content

Commit

Permalink
fix: pressing enter on "Display additional results" does the expected…
Browse files Browse the repository at this point in the history
… thing
  • Loading branch information
Andre Medeiros authored and iurimatias committed Mar 14, 2019
1 parent 5816a79 commit 2cc0d30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/embark-ui/src/components/Console.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2cc0d30

Please sign in to comment.