You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Request: ability to create an accordion that is collapsed initially #35
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.
Activity
ijlyttle commentedon Feb 18, 2017
I agree!
daattali commentedon Jul 4, 2017
@ijlyttle this is the blocker for me :)
ijlyttle commentedon Jul 6, 2017
There are a couple ways to go about this - including your suggestion. I'll bug you about which you may think may be best.
Patanouque commentedon Jun 20, 2019
You can remove the "in" class of the first element of the accordion by doing :
Not very clean but it does the job
tconwell commentedon Apr 21, 2020
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?
warnes commentedon Jan 6, 2023
I just uploaded a function
bs_multi_openin #112 that allows you to control which (if any) of the panels are initially open, as well as enabling/disabling multiple open panels.warnes commentedon Jan 6, 2023
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).