Auto-grow and shrink Text Area component

I’m wondering if there is an easy way to get this sort of behavior: a Text Area component grows and shrinks past a basis as you type so that no scrollbar is shown. It looks like it’s a non-trivial task, even with access to the markup, but maybe one of you has an idea how to do this.

you can use resize i guess.

or track the size of the text through a script which adjusts the height(?)

edit: dont do this:

also there is a hacky way but kinda hard to use as it will need onkeydown events to track input… as it has no text property

you could also mimic a text area with a coordinatecontainer with some styling and give it these styles:
and set the height/width to auto. (and maybe a min-height/min-width)

you will need to change the style with a binding tho as ignition otherwise doesnt like the names starting with - like “-webkit”
(no guarantee it will work in the workstation tho)
you should probably also add in a max-height/width

-webkit-user-modify: read-write;
-moz-user-modify: read-write;
 user-modify: read-write;


image

image

1 Like

I will need to test this out later today! Even the HTML solution was hacky (using a div), so I’m sure if there is a solution, it’ll be a odd one.

1 Like