Skip to content
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

Possibility to enable inheritAttrs #85

Open
matheusilva opened this issue Sep 1, 2023 · 1 comment
Open

Possibility to enable inheritAttrs #85

matheusilva opened this issue Sep 1, 2023 · 1 comment

Comments

@matheusilva
Copy link

I would like to know if it's possible to enable this feature because in my use case, I perform some validations on events when entering and exiting the field (focus/blur/click). Since attribute inheritance is disabled and there are no listener declarations in the component, I am unable to use this component.

Note: I am migrating the application from Vue 2 to Vue 3.

@jonathanpmartins
Copy link
Owner

jonathanpmartins commented Jan 30, 2024

It is handled here:

v-bind="listeners"

And here:

v-money3/src/component.vue

Lines 202 to 211 in ad029f9

const attrs = useAttrs();
const listeners = computed(() => {
const payload = {
...attrs,
};
delete payload['onUpdate:modelValue'];
return payload;
});

All properties you include in the component should be passed down to the input element. Your focus, blur, or click events should work properly.

Have you encountered any issues during your migration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants