escape key to cancel search box

pull/499/head
Matthew Hodgson 2015-12-11 02:32:30 +00:00
parent f2fb1836df
commit 3fb0c9883b
1 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,9 @@ module.exports = React.createClass({
if (e.keyCode === 13) { // on enter...
this.onSearch();
}
if (e.keyCode === 27) { // escape...
this.props.onCancelClick();
}
},
onSearch: function() {