vue-currency-input
vue-currency-input copied to clipboard
CompositionAPI setup() method not called in 2.1.3+
Vue Currency Input version
2.2.0
Vue version
2.6
What browser are you using?
Chrome
What operating system are you using?
Windows
Reproduction link
https://codesandbox.io/s/stoic-grothendieck-dyyn5
Describe your issue
After upgrading to the latest version my custom component no longer works because the setup() method is not called. I traced the bug back to being introduced with the 2.1.3 release (also occurs with 2.2.0).
If I downgrade to 2.1.2 it works fine.
I have installed @vue/composition-api 1.4.1.
I'm also using Nuxt, although I don't think that should matter?
Vue Currency Input does not work in a CodeSandbox in combination with Vue 2 for some reason, but the Vue 2 example works as expected with v2.2.0.
Please provide a minimal reproduction repo for your issue. Thanks!
i have this issue too, the composition api setup method not called, it caused ...method "formattedValue" is not defined on....
@dm4t2 Did some more investigation and looks like this issue is somehow related to Nuxt. The plain Vue example works, but I've created a minimal Nuxt repo based on the same example where the issue can be reproduced:
https://github.com/sindrepm/vue-currency-input-test
Likewise, downgrading vue-currency-input to v2.1.2 "fixes" this problem.
@daemswibowo Do you also happen to be using Nuxt?
In v2.1.3, vue-demi was bumped to the latest version, probably causing the issue with Nuxt.
I managed to get @sindrepm repo work by replacing the @vue/composition-api dependency with @nuxtjs/composition-api: https://composition-api.nuxtjs.org/getting-started/setup/
I will update the docs regarding the usage with Nuxt.