return <textarea className="tox-input" rows=2 ></textarea>;
I want to pass rows=2
to this tag. However, this results in the following error.
Parsing error: JSX value should be either an expression or a quoted JSX text.
After a bit of research, I couldn't find a way to solve this. Please could someone tell me the proper way to do it in JSX?
Note: Using rows={2}
doesn't give an error, but it only shows one row.
Use curly brace:
return <textarea className="tox-input" rows={2} ></textarea>;
It will pass integer.
Playground area
Using rows={2} is the right call. Look for any css rule that limits the max height of the textarea or a parent element that does this.
How to prevent a token created with OAuth 2.0 from expiring?
Can i give string data type as Number For example
I'm looking for advice on how to selectively style with CSS, HTML or Javascript my set of radio buttons to have different background colors depending on which choice is selectedfor example, I would like technology score to have a background color of yellow...
Is it possible to produce the following shape containing a number with CSS:
I've been trying to horizontally center a div on the screen of an IphoneThe div is a bit narrower than the phone screen