Value that is valid to the mask is still being masked #253
Unanswered
rjkooijman
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following issue using vue3.
<input type="url" v-model="url" v-maska data-maska="computedMask" data-maska-tokens="{'U': { 'pattern' : '[a-zA-Z0-9-._~/?#@!:$&()*+,;=%]', multiple': true }}" data-maska-eager />
The computed mask is like this:
const computedMask = computed(() => { if (url.startsWith('https://')) { return 'U'; } return 'https://U'; });
The issue is that when url has a value, from the database, the mask is double applied. So for example when url has the value https://google.com, when loading the component the input has the value https://https://google.com, which is wrong. Therefore the computedMask. The computed feels hacky and as a workaround. Is there a way to fix this without the computed or is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions