Created
April 25, 2019 12:57
-
-
Save v-vashchenko/56ffb6c2643057f7443bde4cf05c25c0 to your computer and use it in GitHub Desktop.
escape listner react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.removeEventListener("keydown", this.handleEscapeButton, false); | |
handleEscapeButton = (event) => { | |
if (event.keyCode === 27) { | |
this.setState({ openFilter: false }); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment