title: Setting rows and columns in input <textarea> in reactJS form
body: <p>I have a ReactJS function that takes a long text string as input and uses it for further processing :</p>
  <pre><code>import React, { useState } from &quot;react&quot;;
  import p21logo from '../images/p21logo-002-1.png'; // with import
  
  export default function SetFilter() {
  const filter1 = {&quot;exaltG.Ju&quot;: {&quot;$eq&quot;: true}}
  const [filter, setFilter] = useState(JSON.stringify(filter1));
   
    const handleSubmit = (e) =&gt; {
      e.preventDefault()
      const message = `data is ${filter}`;
      window.alert(message);
      window.open(`/getfilteredrecords/${filter}`);
    };
   
   return (
     &lt;div&gt;
         &lt;table&gt;
             &lt;tr&gt;
              &lt;td&gt;
              C&lt;img src={p21logo} alt=&quot;ParasharLogo&quot;&gt;&lt;/img&gt;  
              &lt;/td&gt;
              &lt;td&gt;
              &lt;form onSubmit={handleSubmit}&gt;
                &lt;p&gt;Set Filter :&lt;/p&gt;
                &lt;label&gt;
                  &lt;input 
                    type=&quot;textarea&quot; 
                    value={filter}
                    onChange={(e) =&gt; setFilter(e.target.value)}
                    rows={5}
                    cols={60}
                  /&gt;
                  
                &lt;/label&gt;
                &lt;br&gt;&lt;/br&gt;
                &lt;input type=&quot;submit&quot; /&gt;
              &lt;/form&gt;  
              &lt;/td&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
     &lt;/div&gt;
   );
  }
  </code></pre>
  <p>However, irrespective of what I set as the number of rows and columns of the textarea, what shows up is the small, single line default text field. While I can still enter a large text string in this small field, by scrolling to the right, it would be better if I could give a large area as this would obviously help the user to visually see whether the full text has been entered correctly. How should I change my code to offer a larger textarea for data entry?</p>