Textarea in JSON Schema Bridge #979
-
We are using JSON Schema bridge and we are starting up the form with a JSON provided from the backend. I looked into the source and it looks like there is no way to set that a string field needs to be a textarea.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @kevinsimper , Yes you're right, there is no way to tell uniforms to render a textarea unless the theme accepts a prop which transforms the What you probably want to do here is to tell uniforms to render this field as a
Since you are fetching the schema from the server, you will have to derive it on client-side like for example explained here. |
Beta Was this translation helpful? Give feedback.
Hi @kevinsimper ,
Yes you're right, there is no way to tell uniforms to render a textarea unless the theme accepts a prop which transforms the
TextField
into one as that is the one that by default is rendered for all strings (for examplemultiline: true
should work for material theme).What you probably want to do here is to tell uniforms to render this field as a
LongTextField
by passing it inuniforms.component
property like this: