Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any chances for update of virtual-select.js? #672

Closed
krystian8207 opened this issue Mar 6, 2024 · 2 comments
Closed

Any chances for update of virtual-select.js? #672

krystian8207 opened this issue Mar 6, 2024 · 2 comments

Comments

@krystian8207
Copy link

Hi! Thank you for you hard work on this pretty useful package.

Just wanted to ask if there's possibility to update virtual-select.js version (possibly to the latest one) in the nearest future.

The currently used one ([email protected]) causes pretty annoying behavior when updateVirtualSelect is called on controller that is not visible (I mean you need to scroll to see it). Update method forces the container to be scrolled to the bottom immediately after it's called.
See:

library(shiny)
library(shinyWidgets)

ui <- fluidPage(
  tags$h2("Virtual Select"),
  
  fluidRow(
    column(
      width = 4,
      actionButton("update", "Update"),
      virtualSelectInput(inputId = "single", label = "Single select :", choices = month.name, search = TRUE),
      purrr::map(1:15, shiny::tags$hr),
      virtualSelectInput(
        inputId = "multiple", label = "Multiple select:", choices = setNames(month.abb, month.name),
        selected = "Apr", multiple = TRUE
      )
    )
  )
)

server <- function(input, output, session) {
  observeEvent(input$update, {
    shinyWidgets::updateVirtualSelect("multiple", selected = "Feb")
  })
}

shinyApp(ui, server)

The latest version of js library fixes it.
I'd be grateful if you could address my request.
Please let me know if I can help in any way.

Best,
Krystian

@pvictor
Copy link
Member

pvictor commented Mar 6, 2024

Hello!
Thanks for the kind words.
Sure that's done, re-install from GitHub and let me know how it works for you.

Victor

@krystian8207
Copy link
Author

Thank you for so quick reaction, it works!

Krystian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants