Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll DataTable cursor after refresh #3552

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

darrenburns
Copy link
Member

The virtual_size of the DataTable isn't computed until on_idle. If you call move_cursor before on_idle runs, you may try to move to region of the widget that hasn't yet been accounted for in the virtual_size.

By updating move_cursor to update the cursor location after refresh, we know that the virtual_size will already have been recomputed.

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

@darrenburns darrenburns marked this pull request as ready for review October 17, 2023 15:29
@darrenburns darrenburns merged commit 3b170b0 into main Oct 17, 2023
5 checks passed
@darrenburns darrenburns deleted the datatable-add-row-scroll-fix branch October 17, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants