Skip to content

Update status of nested boxes #175

@DillonHammill

Description

@DillonHammill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions