dreamRs / shinyWidgets

shinyWidgets : Extend widgets available in shiny
https://dreamrs.github.io/shinyWidgets/
GNU General Public License v3.0
834 stars 153 forks source link

virtualSelectInput - can't scroll past the highlighted option #712

Open joeramirez opened 3 weeks ago

joeramirez commented 3 weeks ago

There seems to be an issue where you can't scroll past the item that is highlighted inside of a virtualSelectInput. Very basic example:

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  virtualSelectInput(
    inputId = "myselector",
    label = "Select your options",
    choices = LETTERS,
    multiple = T,
    selected = NULL
  )
)

server <- function(input, output, session){
}

shinyApp(ui = ui, server = server)

To replicate:

  1. Click to open the selector
  2. Drag the mouse down to highlight (not check/click) the letter "E" (or any item)
  3. Move the mouse to the right into the scrollbar area, such that you keep an item highlighted
  4. Click the down arrow on the scrollbar multiple times until your highlighted item goes towards the top of the list
  5. You should see that as you keep clicking the highlighted item comes back down towards the middle of the scrollbar - ie, it seems that the scroll bar is resetting once the highlighted item gets to the top. Note sure if this is intentional but it's unintuitive that to keep scrolling down you have to have nothing highlighted.
  6. Same occurs even if you use the scroll wheel while the pointer is in the scrollbar area.