Closed saharhage closed 2 years ago
The events keyup and keydown are already emitted by the component. Please, use one of these events like this :
keyup
keydown
<VuePhoneNumberInput @keyup.enter="yourFunc" />
<VuePhoneNumberInput @keyup="keyupHandler" />
And something like that (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)
export default { methods: { keyupHandler(e) { if (e.key === 'Enter') { // submit your form } } } }
The events
keyup
andkeydown
are already emitted by the component. Please, use one of these events like this :Or
And something like that (https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key)