Andarist / react-textarea-autosize

<textarea /> component for React which grows with content

Home Page:http://andarist.github.io/react-textarea-autosize/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I make this component to start resizing upwards after resizing downwards to a certain height on screen?

desaawa opened this issue · comments

Hi, please i'd like to make this textarea to resize downwards up to a certain point, and then start resizing upwards, so that the cursor never gets hidden from the viewport. Any idea how I can do this. I want the cursor to be a like about 100px from the bottom of the viewport and never go below.

My textarea starts with the following height. Resulting from a minRows of 5.

Screenshot 2021-04-29 at 17 17 02

thanks in advance.

You could try manipulating maxRows - nothing will be added to the core of this component to support this, so if you want to use then you will have to just use what's already available.