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
Is your feature request related to a problem? Please describe.
Browsing between selectables should trigger scroll to always show where the selectable is.
Describe the solution you'd like
Just compare selected_index to scroll_offset to check if the scrollable is in visible area, otherwise scroll the diff amount.
Describe alternatives you've considered
Tried to implement myself by overriding select() and handle_key(), couldn't make it work, scroll is irresponsive.
Is this feature present in other TUI products?
I don't know.
Additional context
Can be reproduced like this : Window -> Container -> [Button, Button, Button ...]
The text was updated successfully, but these errors were encountered:
I think the problem here is that the selection is handled first at the higher level (e.g. Window), which thinks the Container itself is visible so it just moves on. The container doesn't have any awareness that its content is cut off IIRC, so it can't react appropriately. Not sure if an easy implementation here is possible, but it already is a bit more complicated than your (helpful!) algorithm, as widgets might be different heights.
FWIW this should work when inserted at the end of select, but doesn't for the aforementioned reasons.
Is your feature request related to a problem? Please describe.
Browsing between selectables should trigger scroll to always show where the selectable is.
Describe the solution you'd like
Just compare selected_index to scroll_offset to check if the scrollable is in visible area, otherwise scroll the diff amount.
Describe alternatives you've considered
Tried to implement myself by overriding select() and handle_key(), couldn't make it work, scroll is irresponsive.
Is this feature present in other TUI products?
I don't know.
Additional context
Can be reproduced like this : Window -> Container -> [Button, Button, Button ...]
The text was updated successfully, but these errors were encountered: