Skip to content

Sidebar Dropdown Should Toggle When Clicking an Already-Selected Item #8149

@JayadityaGit

Description

@JayadityaGit

When a user selects a sidebar item with nested routes, the dropdown expands as expected. However, clicking the same selected item again does nothing, even though users naturally expect it to collapse. This leads to:

Reduced control over sidebar visibility

Unnecessary scrolling when sections cannot be collapsed

Lower consistency with typical documentation UI behavior

Expected Behavior

Clicking an already-selected sidebar item should toggle the visibility of its dropdown.

Clicking a non-selected item behaves normally (navigate + expand).

When navigating away, the collapsed state should reset automatically so the correct item appears expanded by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions