Closed gnapse closed 1 year ago
Saw your comment in Twist about it not being able to be 1 line to start. This is a technique I've used before that accomplished it; not sure if you've tried this or if it would work but thought I'd share!
Saw your comment in Twist about it not being able to be 1 line to start. This is a technique I've used before that accomplished it; not sure if you've tried this or if it would work but thought I'd share!
@doistephen thanks for the tip. Actually, that's the same technique I'm using, but for some reason when I tried rows="1"
it did not grow. However, when I tried it now it worked. It seems I tried this when the rest of the solution was not entirely ready, within the back and forth while I was working on this. Anyway, it works now, so I'm pushing an updated version soon. Thanks!
@gnapse one thing I found from testing (unrelated to your changes) is that if I use tone="loading"
, it shows the spinner only if add a "message" property. Not sure if it is intended, but wanted to leave a note anyway.
p.s. I checked on Windows in all browsers, but didn't test Safari on Mac.
Good idea to check in multiple browsers. I will check on Safari before merging.
Update: tested it and it works as expected.
if I use tone="loading", it shows the spinner only if add a "message" property. Not sure if it is intended, but wanted to leave a note anyway.
That is expected. In the end, the tone only matters when you add a message. Except for the error tone, which also sets the border as red, even if there's no message.
Short description
Adds support for the
TextArea
to auto-expand its height to fit the content as you type. Based on this approach, without requiring any external library or complex JS. It seems to work pretty well.References
Test plan
PR Checklist
npm run validate
and made sure no errors / warnings were shownCHANGELOG.md
package.json
andpackage-lock.json
(npm --no-git-tag-version version <major|minor|patch>
) refnpm run build-all
)Versioning
New minor release.