imaskjs icon indicating copy to clipboard operation
imaskjs copied to clipboard

Accept and Complete events are not fired in version 7

Open sebestenyb opened this issue 8 months ago • 0 comments

Describe the bug Upgraded the package from 6.* to 7.*, and the @accept and @complete events are not fired using directive. We use Vite (with Laravel) to package and chunk the JS code.

To Reproduce

// app.ts
import {IMaskDirective} from 'vue-imask';

app.directive("mask", IMaskDirective as Directive);
// Component.vue
    <input
        v-model="numberModel"
        v-mask="Number"
        radix="."
        :unmask="true"
        @accept="onAccept"
        @complete="onComplete"
    />
// Component.vue
const numberModel = ref('');

const onAccept = (event: CustomEvent) => {
    console.log(event)
}
const onComplete = (event: CustomEvent) => {
    console.log(event)
}
// npm
npm list vue-imask
trips@ ~/Sites/trips
└── [email protected]

Expected behavior We expect the events to be fired

We know it's not a lot of information, but we are in the dark here a bit, no errors, the mask works as it is supposed to work, masking the input, but the events are not fired. Any idea would be appreciated.

Environment:

  • OS: *
  • Browser: *
  • Version *
  • IMask version: 7.6.1 (checked for all 7.*)

Additional context Add any other context about the problem here.

sebestenyb avatar Jun 11 '24 20:06 sebestenyb