This can be a limitation when one wants to use styles to customize how the button looks like when the corresponding panel is collapsed / expanded, which is also the reason behind the example above.
See the attached example Shiny app bs_attach_collapse_custom-class.R, where the classes were added back using tagAppendAttributes() as a workaround.
When
bs_attach_collapse()
is called on a button with custom additional classes, e.g.:such classes are lost:
This can be a limitation when one wants to use styles to customize how the button looks like when the corresponding panel is collapsed / expanded, which is also the reason behind the example above.
See the attached example Shiny app bs_attach_collapse_custom-class.R, where the classes were added back using
tagAppendAttributes()
as a workaround.