Skip to content

Can we set height of textarea? #261

Answered by jmikrut
Duckinm asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Duckinm

You can set the height of a textarea like this:

const textareaField = {
  name: 'yourFieldHere',
  type: 'textarea',
  admin: {
    rows: 10, // set however many rows you want the textarea to appear with
  }
}

Also, from your screenshot, it looks like when you resized your textarea, you dragged it behind the field to the right, which is no longer clickable / resizable because that field is sitting on top of your actual clickable textarea handle. Maybe a good future option would be for us to add a field property to textareas that disables resizing.

What do you think?

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by denolfe
Comment options

You must be logged in to vote
0 replies
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