Closed Jared-Kim closed 4 months ago
X-directives simply apply directives that are available in your app. The doc does not state it, but the example relies on v-mask. The codepen does not load v-mask which is why it is broken, but the example in the doc is not.
Thank You. Do you know if there is any way to trim whitespace from a string using x-directives?
Additionally I found that using mask like so on a string works
"test": {
"type": "string",
"x-directives": [
{
"name": "mask",
"value": "####-##"
}
]
},
But using it on an array of strings like this doesn't seem to work. Do you know is this is an issue with x-directives, or with v-mask itself?
"test": {
"type": "array",
"items": {
"type": "string",
"x-directives": [
{
"name": "mask",
"value": "####-##"
}
]
}
},
It is a limitation of x-directives. You could trim whitespace by writing your own directive and applying it with x-directives.
Was able to figure it out, thanks for the help
I have been trying to use x-directives to set a mask like the example seen here in the documentation https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples/#directives. However, I can't seem to get the mask to apply, and the codepen example for this attached to the documentation does not seem to work either. Is this an issue with the x-directives feature itself or a bug in the codepen? If x-directives is in fact working, are any directives supported other than mask?