Closed jeffminsungkim closed 2 years ago
@jeffminsungkim Thanks for the PR
I think we should allow pressing all keyCode to close the alert up to what the user wants.
Can you make prop keyCodeForClose
type is Array of Number and onKeyPress
?
const options = {
keyCodeForClose: [13, 27, ...],
onkeyPress: (event) => {
// Do something that you want from keyboard
}
}
@jeffminsungkim Thanks for the PR I think we should allow pressing all keyCode to close the alert up to what the user wants. Can you make prop
keyCodeForClose
type is Array of Number andonKeyPress
?const options = { keyCodeForClose: [13, 27, ...], onkeyPress: (event) => { // Do something that you want from keyboard } }
I'm not quite following. Do you want me to remove onKeypressEscape
property as well?
It seems like onKeyPress
and keyCodeForClose
props are new.
@jeffminsungkim Thanks for the PR I think we should allow pressing all keyCode to close the alert up to what the user wants. Can you make prop
keyCodeForClose
type is Array of Number andonKeyPress
?const options = { keyCodeForClose: [13, 27, ...], onkeyPress: (event) => { // Do something that you want from keyboard } }
I'm not quite following. Do you want me to remove
onKeypressEscape
property as well? It seems likeonKeyPress
andkeyCodeForClose
props are new.
@jeffminsungkim Just add new props keyCodeForClose
and onKeyPress
This feature allow users to press enter key to close the alert. Also, after enter method will be triggered when the alert disappears.