Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #33345
Closed
Open
Issue created Mar 12, 2021 by Administrator@rootContributor

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.

Assignee
Assign to
Time tracking