How do I avoid ugly autoscrolling with nested repeating panels?

This sample app contains a DataGrid component. The row template form contains a link that shows/hides a nested repeating panel. The result is similar to a tree that can be expanded or collapsed.
https://anvil.works/build#clone:JPPOZGO3WCB4KL4U=U5WQ5JP7KY5A3VQMJ7UOZF6W

Everything works well in a large window, but when you run this app in a small window and you click on a link, the whole table scrolls up to the top.

I have tried adding a self.scroll_into_view() on the open event of the row form, but it always puts the last item in the center of the view and the end result is still unusable.

Hi @stefano.menci,

Thanks for spotting this. It’s a bug in the interaction between DataGrids and RepeatingPanels. I’ll make sure it gets taken care of!

[Moved to bug reports]