Open daattali opened 7 years ago
I agree!
@ijlyttle this is the blocker for me :)
There are a couple ways to go about this - including your suggestion. I'll bug you about which you may think may be best.
You can remove the "in" class of the first element of the accordion by doing :
attrib_ = my_accordion$children[[1]]$children[[2]]$attribs
attrib_[which(attrib_ == "in")] = NULL
my_accordion$children[[1]]$children[[2]]$attribs = attrib_
Not very clean but it does the job
I am unsuccessfully trying to do the same thing using something like this: bs_accordion(id = a_id) %>% bs_set_aria("div", multiselectable = TRUE, expanded = FALSE) %>% bs_append(title = paste(p_title, "Exposure", sep = " "),
Do you have any advice on how to best have the panels default as closed?
I just uploaded a function bs_multi_open
in #112 that allows you to control which (if any) of the panels are initially open, as well as enabling/disabling multiple open panels.
Now available in PR #133 via the function bs_accordion_multi
. The man page example demonstrates this (also shown in the comments to PR #113).
It'd be nice to be able to do something like
so that the accordion will initialize in a collapsed state