From 60f2f1f390e15ba78281f094d907a98f81ff4166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bj=C3=B6rn?= <61984272+erikbjoern@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:03:06 +0100 Subject: [PATCH] feat(vue-tel-input): emit event objects for standard events --- src/components/vue-tel-input.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/vue-tel-input.vue b/src/components/vue-tel-input.vue index 2bb9786a..c7744a3a 100644 --- a/src/components/vue-tel-input.vue +++ b/src/components/vue-tel-input.vue @@ -530,18 +530,18 @@ export default { this.$emit('update:modelValue', value); this.$emit('on-input', value, this.phoneObject, this.$refs.input); }, - onBlur() { - this.$emit('blur'); + onBlur(e) { + this.$emit('blur', e); }, - onFocus() { + onFocus(e) { setCaretPosition(this.$refs.input, this.phone.length); - this.$emit('focus'); + this.$emit('focus', e); }, - onEnter() { - this.$emit('enter'); + onEnter(e) { + this.$emit('enter', e); }, - onSpace() { - this.$emit('space'); + onSpace(e) { + this.$emit('space', e); }, focus() { this.$refs.input.focus();