You can write a JS function to make the TextArea scroll down when called.
<div anvil-slot-repeat="default" class="scroll-me"></div>
<script>
var scrollTextArea = function() {
var $textarea = this.find('.scroll-me textarea');
$textarea.scrollTop($textarea[0].scrollHeight);
}
</script>
Here’s an app with a CustomComponent that does that. Call its scroll_to_bottom
method whenever you want it to scroll to the bottom.
https://anvil.works/build#clone:XQH7GSHBV7IBQQT4=5KKAHZTPKFGXECJ2M6YGUNXC
This is a great way to display log feeds and other line-based output. I used it in the SSH Client app I wrote when you were wondering about SSHing into your machines remotely without needing to remember your laptop (this thread: Browser Based SSH).