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

Update status of nested boxes #175

Open
DillonHammill opened this issue Nov 8, 2022 · 0 comments
Open

Update status of nested boxes #175

DillonHammill opened this issue Nov 8, 2022 · 0 comments

Comments

@DillonHammill
Copy link

Thanks for the great package!

I am encountering an issue using updateBox() on nested boxes. If I update the status of the parental box, the status of the collapsible button in the child box also changes... Everything works as expected when the boxes are not nested...

library(shiny)
library(shinydashboardPlus)

ui <- dashboardPage(
  header = dashboardHeader(),
  sidebar = dashboardSidebar(),
  body = dashboardBody(
    shinydashboardPlus::box(
      box(
        id = "box2",
        title = "Testing",
        solidHeader = TRUE,
        status = "primary",
        collapsible = TRUE
      ),
      id = "box1",
      title = "Testing",
      solidHeader = TRUE,
      status= "primary",
      collapsible = TRUE
    )
  )
)
server <- function(input, output, session) {
  updateBox(
    id = "box1",
    action = "update",
    options = list(
      "status" = "danger"
    ),
    session = session
  )
}
shinyApp(ui = ui, server = server)

image

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

1 participant