vue-form-json-schema
vue-form-json-schema copied to clipboard
How to v-bind?
For example, how to achieve the
:md-format="toUppercase"
Functionality described in https://vuematerial.io/components/chips?
Hi,
You would need to pass md-format
as a prop to the component. The prop would need to be a function which does the uppercase transformation.
{
"component": "md-chips",
"fieldOptions:" {
"props": {
"md-format": (string) => String(string).toUpperCase(),
}
}
}
There's unfortunately no way to use any of Vue's built in directives here, all transformations must be done with javascript functions. You can refer to Vue's documentation for more info about this limitation
Thank you for your quick response. Unfortunately, this does not work for my use case. What I am trying to format with md-chips is a formatted object from a dialog response. Every time md-format is called, its input is an empty string but what's rendered eventually on the screen is the entire returned object.
@jarvelov can you please help?