@Dibbsie okay great, I’m glad you’re making progress.
So try adding a delay. This is a quick thing you can try and will see quickly if it works or not. By adding a small delay before attempting to scroll this ensures all new rows are fully rendered before the scroll action is executed.
- Adding Delay: The
setTimeout
function introduces a slight delay, ensuring that the new row is fully rendered before scrolling. - Scrolling Action: After the delay, the table is scrolled to the bottom by setting
table.scrollTop
totable.scrollHeight
.
<script>
function scrollToBottom() {
var table = document.querySelector(".your-table-class");
if (table) {
setTimeout(function() {
table.scrollTop = table.scrollHeight;
}, 100); // Adjust the timeout as needed
}
}
</script>
Hopefully this helps.
This person has a similar issue, not sure if the solution with help you.
Table Element “scroll to” functionality - Need help - Bubble Forum