shinyjqui icon indicating copy to clipboard operation
shinyjqui copied to clipboard

jqui_resizable blocked by other elements if nested in tagList?

Open Toniiiio opened this issue 2 years ago • 1 comments

Thanks for the great package!

Consider the following code. It has three elements. But if you uncomment jqui_resizable(leafletOutput('myMap')), the two dygraphs are not resizable any more.

However, if i do not nest the outputs in a tagList it also seems to work.

# works 
jqui_resizable(leafletOutput('myMap')),
jqui_resizable(dygraphOutput("rew", height = "100px")),
jqui_resizable(dygraphOutput("rew2", height = "100px"))

So my assumption would be that jqui_resizable() is blocked (if nested in tagList()) by another element ? For my use case not using tagList() as a workaround is hardly possible.

Thanks for any help!

Reproducible example:

library(shiny)
library(leaflet)
library(dygraphs)
library(shinyjqui)

ui <- fluidPage(
  # jqui_resizable(leafletOutput('myMap')),
  # jqui_resizable(dygraphOutput("rew", height = "100px")),
  # jqui_resizable(dygraphOutput("rew2", height = "100px"))
  uiOutput("xx")
)

server <- function(input, output, session) {
  map = leaflet() %>% addTiles() %>% setView(-93.65, 42.0285, zoom = 17)
  output$myMap = renderLeaflet(map)
  
  output$rew <- renderDygraph({
    dygraph(ldeaths)
  })
  
  output$rew2 <- renderDygraph({
    dygraph(mdeaths)
  })
  
  output$xx <- renderUI({
    out <- tagList()
    out <- tagList(out, jqui_resizable(dygraphOutput("rew", height = "100px")))
    out <- tagList(out, jqui_resizable(dygraphOutput("rew2", height = "100px")))
    out
  })
}

shinyApp(ui, server)

Toniiiio avatar Jun 06 '22 11:06 Toniiiio

Thanks for bringing me to this. Looks like it's a bug. I'll let you know if I find any clue

Yang-Tang avatar Jun 08 '22 14:06 Yang-Tang