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
Just ran into this for the first time -- seems that if the select is long, your cursor will be placed at the bottom while the first selected item is at the top, outside of the active terminal. If you scroll up to see the active item and then press "down" to the next item, it will indeed select the correct item, but the entire list will be re-rendered and the cursor placed again at the bottom. Once the active item comes into the viewport, then it navigates correctly; the issue seems to be when the active item is outside of the viewport.
Hard to explain, easiest reproduced by creating a select with enough items to overflow the active terminal viewport and pressing buttons 😅
Here's a gif:
One thing that would be nice here is to be able to specify a maximum size for the select, i.e. max height 5 lines and then scrolling the items when navigating up/down. In my example above, I don't really want my user's terminal to be spammed with all possible bitcoin core versions, it's most likely one of the most recent versions they're interested in, but I don't want to deny them older versions either. So only displaying i.e. the 5 most recent versions at first would be a benefit.
Not quite sure how to implement this if I were to take a stab at it...
The text was updated successfully, but these errors were encountered:
cylewitruk
changed the title
[bug] issues when rendering a select whose items are longer than the active terminal window
[bug] issues when rendering a select whose items are longer than the active terminal viewport
Aug 1, 2024
@fadeevab For now I've just limited the select to the 5 most recent versions as I think that's the 98% use-case, so no rush, but yeah this is something that should be looked into anyway :) If I get some free time I'll play around with it.
Just ran into this for the first time -- seems that if the select is long, your cursor will be placed at the bottom while the first selected item is at the top, outside of the active terminal. If you scroll up to see the active item and then press "down" to the next item, it will indeed select the correct item, but the entire list will be re-rendered and the cursor placed again at the bottom. Once the active item comes into the viewport, then it navigates correctly; the issue seems to be when the active item is outside of the viewport.
Hard to explain, easiest reproduced by creating a select with enough items to overflow the active terminal viewport and pressing buttons 😅
Here's a gif:
One thing that would be nice here is to be able to specify a maximum size for the select, i.e. max height 5 lines and then scrolling the items when navigating up/down. In my example above, I don't really want my user's terminal to be spammed with all possible bitcoin core versions, it's most likely one of the most recent versions they're interested in, but I don't want to deny them older versions either. So only displaying i.e. the 5 most recent versions at first would be a benefit.
Not quite sure how to implement this if I were to take a stab at it...
The text was updated successfully, but these errors were encountered: