bsplus
bsplus copied to clipboard
Suggestion: bs_set_opts() should not have any effect when not given any parameters
If I create a simple accordion like this:
library(shiny)
ui <- fluidPage(
bs_accordion("foo") %>%
bs_append("bar", "hello world")
)
server <- function(input, output, session) {
}
shinyApp(ui = ui, server = server)
I get an accordion with the default gray look and only the title text is clickable.
But if I simply add bs_set_opts() in the mix, then the look changes to blue and the entire header is clickable (because of the default params).
I think it's very unintuitive that simply calling the set options function without providing any options results in vastly different options than not using it at all.
You've got a point. I think there was a reason I did this that way (I was trying to be lazy in how I set up an accordion-sidebar), but it probably wasn't a good enough reason.
This may be a slightly breaking change, but it sounds like the right thing to do. I will just have to take my medicine.
Thanks!