mirror of
https://github.com/tenrok/maska.git
synced 2026-06-05 16:42:28 +03:00
Fix bug with hooks order
This commit is contained in:
+6
-6
@@ -144,6 +144,12 @@ export class MaskInput {
|
||||
|
||||
value = mask.masked(value)
|
||||
|
||||
const detail = {
|
||||
masked: mask.masked(value),
|
||||
unmasked: mask.unmasked(value),
|
||||
completed: mask.completed(value)
|
||||
}
|
||||
|
||||
if (this.options.postProcess != null) {
|
||||
value = this.options.postProcess(value)
|
||||
}
|
||||
@@ -151,12 +157,6 @@ export class MaskInput {
|
||||
input.value = value
|
||||
input.dataset.maskaValue = value
|
||||
|
||||
const detail = {
|
||||
masked: mask.masked(value),
|
||||
unmasked: mask.unmasked(value),
|
||||
completed: mask.completed(value)
|
||||
}
|
||||
|
||||
if (this.options.onMaska != null) {
|
||||
if (Array.isArray(this.options.onMaska)) {
|
||||
this.options.onMaska.forEach((f) => f(detail))
|
||||
|
||||
Reference in New Issue
Block a user