TextArea height (rows) starting with 1, then expands

Hi.

Is there a way to set Vaadin TextArea component height (rows) starting with 1 (not by 2 by default), then expanding up to n rows/pixels, with a scrollbar?

Cheers, Simon
18341370.png

I need the same. Any luck getting that to work?

Thanks.

Tino Kakoushis:
I need the same. Any luck getting that to work?

Thanks.

Unfortunately not.

\u0000This requires a bit of JavaScript to fix. You need to set rows=1 to the internal element (https://github.com/vaadin/vaadin-text-field/blob/master/src/vaadin-text-area.html#L63)\n\t\nThere\u2019s an old issue regarding this, that you can vote (\uD83D\uDC4D): https://github.com/vaadin/vaadin-text-field/issues/229\n\nAn alternative is to use the "textarea" slot, and place your own element there:\n\t\nhtml\n<vaadin-text-area>\n\t<textarea slot=\"textarea\" rows=\"1\"></textarea>\n</vaadin-text-area>\n

Jouni Koivuviita:
This requires a bit of JavaScript to fix. You need to set rows=1 to the internal element (https://github.com/vaadin/vaadin-text-field/blob/master/src/vaadin-text-area.html#L63)

Thank you, but the link is broken

Try this one: https://github.com/vaadin/vaadin-text-field/blob/2.8/src/vaadin-text-area.html#L63