escape key to cancel search box

This commit is contained in:
Matthew Hodgson 2015-12-11 02:32:30 +00:00
parent f2fb1836df
commit 3fb0c9883b

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() {