Docs for the collapse component do not include example for data-bs-parent
Created by: danielkauffman
The v5 docs for the collapse component state:
To add accordion-like group management to a collapsible area, add the data attribute data-bs-parent="#selector". Refer to the demo to see this in action.
However, the example on that page does not show how to use the data-bs-parent
attribute.
The example from the v4 docs shows how to use the data-parent
attribute to get accordion-like group management.
The data-bs-parent
attribute works in v5, but I had to parse the docs for v4 in order to figure out how to use it.
I'm doing accordion-like group management, but not wanting the accordion markup, so using collapse with the data-bs-parent
attribute works perfectly for me.
This appears to be a regression arising from moving the accordion to a separate section in the docs. Ideally, I think the v5 docs for the collapse component should have an example showing the use of the data-bs-parent
attribute and the v5 docs for the accordion component should describe the data-bs-parent
attribute as critical for accordion behavior.
See also #33214.