New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum call stack size exceeded with v-on="$listeners"
#2347
Comments
ok, I'm just an idiot. In a more carefull look at the so the workaround here is to delete listeners.blur, before appling to the Tho the blur might be usefull for ppl, right? actually I'm needing the |
can I help in any way? |
for anyone comming here from a similar problem, (based on the codesandbox I created) <template>
<input
v-bind="$attrs"
class="ui-input"
v-on="listeners"
@input="$emit('input', $event.target.value)"
@blur="$emit('blur', $event)"
>
</template>
<script>
export default {
computed: {
listeners() {
const listeners = {...this.$listeners}
delete listeners.input // for v-model to work, look at <template>
delete listeners.blur // removing blur event to work around a bug in VeeValidate
return listeners
},
},
}
</script> It seems like a pretty ok workaround to me |
Versions
Describe the bug
If you create a custom component for an input and add
v-on="$listeners"
on the input, and try to validate the field, it will throw a maximun call stack exceeded error.Demo link
https://codesandbox.io/s/vue-template-7jsub?fontsize=14
To reproduce
Steps to reproduce the behavior:
Expected behavior
Not to throw error
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
If you remove the
v-on="listeners"
from theCustomInput
it starts working properly, so what I imagine is that there is some event emitting messing with it. I would really like to know what event is that so that I can omit that event from the listeners computed and call that a workaround, but I couldn't find out by looking at the src code for the ValidationProvider, thats why I'm opening my issue.Also I'm opening this issue because I belive it is diferent from the:
because of the
v-on="listeners"
quirky to it.The text was updated successfully, but these errors were encountered: