You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think similar to #3533, the problem is that DataTable dimensions are only calculated on idle. The window in scroll_to_region has a height/width of zero, so the scrolling with move_cursor won't work.
But I'm sure you figured that out already, I'm just not sure of the proper fix.
Yeah, exactly right. The virtual_size needs to be updated before move_cursor works. Since the virtual_size is recomputed inside on_idle, if you try to move the cursor immediately, it won't work.
I think the fix is literally just to use call_after_refresh(self._scroll_cursor_into_view) inside move_cursor, since this can only work after on_idle runs.
Reported on Discord. If you add rows then call move cursor, the view won't follow the cursor.
A workaround is to use
call_after_refresh
, which suggests something on idle needs to be done beforemove_cursor
works?The text was updated successfully, but these errors were encountered: