juba / shinyglide

Glide.js component for Shiny apps
https://juba.github.io/shinyglide/
91 stars 8 forks source link

Next button no longer functional after re-rendering glide #42

Closed ismirsehregal closed 1 year ago

ismirsehregal commented 1 year ago

Coming from here:

Once the number of screens is increased, the next button is no longer functional (using latest CRAN version):

image

This seems to be related.

library(shiny)
library(shinyglide)

ui <- fluidPage(
  numericInput(
    inputId = "NbScreen",
    label = "Number of screens:",
    value = 3,
    min = 1,
    max = 100
  ),
  uiOutput("glideUI")
)

server <- function(input, output, session) {
  output$glideUI <- renderUI({
    glide(
      lapply(seq_len(input$NbScreen), function(i) {
        screen(p(paste("screen", i)))
      })
    )
  })
  outputOptions(output, "glideUI", suspendWhenHidden = FALSE)
}

shinyApp(ui, server)
juba commented 1 year ago

Did you try with the development version ?

ismirsehregal commented 1 year ago

@juba this is indeed working fine using the dev version, thank you!