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

accordion(open=TRUE) is applied to nested accordions #1108

Open
gadenbuie opened this issue Aug 29, 2024 · 1 comment
Open

accordion(open=TRUE) is applied to nested accordions #1108

gadenbuie opened this issue Aug 29, 2024 · 1 comment

Comments

@gadenbuie
Copy link
Member

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

@maxl-amberg
Copy link

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

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