bslib icon indicating copy to clipboard operation
bslib copied to clipboard

`accordion(open=TRUE)` is applied to nested accordions

Open gadenbuie opened this issue 1 year ago • 2 comments

In the following example, Accordion 2 should be open but the nested accordion within Accordion 2 should have all of its panels closed.

library(shiny)
library(bslib)

ui <- page_fluid(
  accordion(
    open = "Accordion 2",
    accordion_panel("Accordion 1"),
    accordion_panel(
      "Accordion 2",
      accordion(
        open = FALSE,
        accordion_panel("Nested accordion 1"),
        accordion_panel("Nested accordion 2")
      )
    )
  )
)

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

shinyApp(ui, server)

image

gadenbuie avatar Aug 29 '24 16:08 gadenbuie

Unfortunately, I have encountered the exact same issue and would also be very interested in a solution.

maxl-amberg avatar Sep 17 '24 12:09 maxl-amberg

Same needed usecase here, any workaround?

jcrodriguez1989 avatar Jan 28 '25 14:01 jcrodriguez1989