Skip to content

Textarea in JSON Schema Bridge #979

Answered by wadamek65
kevinsimper asked this question in Q&A

You must be logged in to vote

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 example multiline: 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 in uniforms.component property like this:

{
  "title": "Address",
  "type": "object",
  "properties": {
    "city": { "type": "string" },
    "state": { "type": "string" },
    "street": { "type": "string", "uniforms": { "component": LongTextField } },
    "zip": { "type": "string", "pattern": "[0-9]{…

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by radekmie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #978 on July 07, 2021 14:14.