We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
updatePanel
I would like to be able to programmatically update the title of a bsCollapsePanel, but this is not currently supported.
bsCollapsePanel
For example, I would like this to work:
library(shiny) library(shinyBS) ui <- fluidPage( sidebarLayout( sidebarPanel(HTML("This button will open Panel 1 using <code>updateCollapse</code>."), actionButton("p1Button", "Push Me!"), selectInput("styleSelect", "Select style for Panel 1", c("default", "primary", "danger", "warning", "info", "success")), textInput("p2Title", "Panel 1 Title", value = "Panel 1", width = "100%") ), mainPanel( bsCollapse(id = "collapseExample", open = "Panel 2", bsCollapsePanel("Panel 1", "This is a panel with just text ", "and has the default style. You can change the style in ", "the sidebar.", style = "info"), bsCollapsePanel("Panel 2", "This panel has a generic plot. ", "and a 'success' style.", plotOutput("genericPlot"), style = "success") ) ) ) ) server <- function(input, output, session) { output$genericPlot <- renderPlot(plot(rnorm(100))) observeEvent(input$p1Button, ({ updateCollapse(session, "collapseExample", open = "Panel 1") })) observeEvent(input$styleSelect, ({ updateCollapse(session, "collapseExample", style = list("Panel 1" = input$styleSelect)) })) # ------- This should change the title of Panel 1 --------- observeEvent(input$p1Title, ({ updateCollapse(session, "collapseExample", title = list("Panel 1" = input$panel1Title)) })) #-------- } shinyApp( ui=ui, server=server )
Please add, :-)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like to be able to programmatically update the title of a
bsCollapsePanel
, but this is not currently supported.For example, I would like this to work:
Please add, :-)
The text was updated successfully, but these errors were encountered: