A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dm4t2/vue-currency-input/issues/398 below:

No emits on vue 2.7.10 & nuxt · Issue #398 · dm4t2/vue-currency-input · GitHub

Vue Currency Input version

3.0.5

Vue version

2.7.10

What browser are you using?

Chrome

What operating system are you using?

OSX

Reproduction link

https://example.com

Describe your issue

Hi! I've setup according to the guide, I created a CurrencyInput.vue component with the following content:

<template>
  <input ref="inputRef" type="text" class="input__input" />
</template>

<script>
import { useCurrencyInput } from 'vue-currency-input'

export default {
  name: 'CurrencyInput',

  props: {
    value: {
      type: Number,
      default: 0,
    },
    options: {
      type: Object,
      default: () => {
        return {
          currency: 'EUR',
        }
      },
    },
  },

  setup(props) {
    const { inputRef } = useCurrencyInput(props.options)

    return { inputRef }
  },
}
</script>

I then use it in my other component:
<currency-input ref="inp" id="input-price" :v-model="price" placeholder=" " @change="priceChanged" />

But @change is never called, so no emits. What am I doing wrong here?
It clearly states the following in the guide:

By default, the number value is automatically emitted on each input


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4