in my r Shiny app I have a simple select selectinput widget:
selectInput("select_a_name",
selectize = FALSE,
label = "Select Name",
choices = names_active_reactive$names,
multiple = FALSE,
selected = selected_name,
size = 25)
The user is selecting one name from a long vector of names (names_active_reactive$names, over 100 long). Notice that that vector is a reactive value - this seems to be the issue.
I have enough real estate on the screen, and so I allow the user to see quite a few names, which is why I set size = 25.
So, when the user wants to select, for example, user 50, s/he has to use the scrolling bar on the right side of the window until s/he finds user 50 and select that user. As a result, user 50 is selected and selectinput window shows 25 names whereby the currently selected user (#50) is at the very bottom of the window.
If the user wants to see the names of a few more users after 50 (e.g., users 51-65), s/he has to scroll further down. Let's say the user clicks on another name in the middle of the window (user 60). In this case, that name becomes selected but immediately shifts to the very bottom of the widget window! And names 61+ are not visible anymore.
I wonder if it is at all possible to get rid of that widget behavior that forces the selected element in the list to appear always at the very bottom of the window.
Notice, that this problem doesn't exist when the choices are a fixed list. But it emerges when the choices are reactive Values.
And a bonus question: is it in any way possible to allow the user to scroll down the list of names in the window using "arrow down" on the keyboard?
Thank you very much!