R
R
Ruslan Absalyamov2018-12-06 16:28:52
Vue.js
Ruslan Absalyamov, 2018-12-06 16:28:52

Is it possible to make a change event in a vue-masked-input module?

Purely @change doesn't work in this module, only input. But the change event can somehow be done for this module?
https://www.npmjs.com/package/vue-masked-input

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Sedyshev, 2018-12-06
@rusline18

https://github.com/niksmr/vue-masked-input/issues/24
It hasn't been done for a year already, so it's unlikely they will.
Method 1: fork and do it yourself.
Method 2: try to add a handler via $refs:

mounted () {
  this.$refs.maskedInput.$refs.input.addEventListener('change', this.onInputChange)
}

D
Denis Bondarenko, 2019-06-24
@mr_d_bondarenko

I fiddled around with this component, eventually gave up and used the usual inputMask. Well, yes, you don’t use it as a directive - you have to use it as a class, but there are no problems with change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question