Open Artessan opened 6 months ago
Did you try ['(+12) 345 67 89 12', '345 67 89 12']
?
Hey, tested, the result is the same.
after checking some parts of the code I think the problem is this:
this is the render data on the div
wireui_inputs_maskable({isBlur:false,model:null,emitFormatted:false,mask:'[\'(+##) ### ## ## ##\', \'### ## ## ##\']',})
the mask is echoing as string and in
ts/utils/masker/index.ts
export const applyMask: ApplyMask = (mask, value, masked = true): string | null => {
return Array.isArray(mask)
? dynamicMasker(mask, str(value), masked)
: singleMasker(mask, str(value), masked)
}
before this The mask is never checked, parse or split as array; So the isArray method is always false using single mask
Describe the bug x-phone component: when a multiple mask the array is handle as one string
To Reproduce
produce: ['(+12) 345 67 89 12, 345 67 89 12']
Expected behavior (+12) 345 67 89 12
Dependencies