Using BringIntoView to scroll to a desired item created by Each in ScrollView

Hello! I have a ScrollView which I populate with Each. After populating the items, how can I use BringIntoView to scroll to a certain item? Also is it possible to scroll without an animation?

Hi Matti,

there are some ways to achieve what you’re describing, but it’s impossible to suggest the right one without seeing what you have tried so far.

It would help a lot if you could post a minimal, complete reproduction that shows that particular part of your app (think: single UX-file app) and we could take it from there.

To leave you with an exercise, there’s ScrollView interface. You could pulse a trigger from JS which sets the ScrollPosition to an y(targetNodeUxName) UX expression, or you could directly call .seekTo() from JS on the ScrollView.

Thanks for the tip! Since I knew the index position of the desired element and the total number of elements plus the height of the elements were the same, I used seekToRelative to jump to the correct one.