Skip to content

keyup not working in v.2.1 #287

Answered by GeneralNight
GeneralNight asked this question in Q&A
Discussion options

You must be logged in to vote

I solved by my self...

vue-currency-input is a component so, we just need add the @keyup="mtFunction" into the input in customCurrencyInnput.vue and pass any parameter by props like my example bellow:

In customCurrencyInnput.vue

<template>
  <input 
    ref="inputRef" 
    :value="formattedValue" @keyup="updateSome()"
  >
</template>

<script>
import { watch } from '@vue/composition-api' 
import { useCurrencyInput } from 'vue-currency-input'

export default {
  name: 'CurrencyInput',
  props: {
    value: Number,
    options: Object,
    test: Text
  },
  setup (props) {
    const {
      inputRef,
      formattedValue,
      setOptions,
      setValue
    } = useCurrencyInput(props.optio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GeneralNight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant