1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

apply search term on enter key

This commit is contained in:
AWolf81
2019-05-29 09:02:34 +02:00
parent 60e841e5a2
commit 639bfbe549

View File

@@ -74,6 +74,11 @@ class TopBar extends React.Component {
}
handleKeyDown (e) {
// Re-apply search field on ENTER key
if (e.keyCode === 13) {
this.debouncedUpdateKeyword(e.target.value)
}
// Clear search on ESC
if (e.keyCode === 27) {
return this.handleSearchClearButton(e)