mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[GH-ISSUE #716] Add scrollChildIntoView method to ScrollBoxRenderable #195
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jorgeraad on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/716
Originally assigned to: @simonklee on GitHub.
ScrollBoxRenderable has
scrollToandscrollByfor position-based scrolling, but no way to say "make this child visible." Consumers end up writing the same ~15 lines of boilerplate every time they have a keyboard-navigable list inside a scrollbox: find the child by ID, calculate its position relative to the viewport, andscrollBythe right delta.The class already has everything it needs internally (
findDescendantById,viewport.height,scrollTop,scrollBy), so this would be a thin convenience method on the same level asscrollTo/scrollBy.@simonklee commented on GitHub (Feb 21, 2026):
Thanks, i think the poc impl was mostly correct. I adjusted it a little and created a PR.