ijlyttle / bsplus

Shiny and R Markdown addons to Bootstrap 3
http://ijlyttle.github.io/bsplus/
Other
146 stars 23 forks source link

Suggestion: bs_set_opts() should not have any effect when not given any parameters #36

Open daattali opened 7 years ago

daattali commented 7 years ago

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.

ijlyttle commented 7 years ago

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!