Skip to content

Give collapsed bs-panel "collapsed" class initially #178

Description

@AGresvig

When using the bs-panel as a collapsible panel that is closed initially, like this:

{{#bs-panel heading="My Heading" collapsible=true open=false}}

..then the "collapsed" class is not added to the panel initially.

Suggestion:
The following line in bs-panel.hbs

<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion" {{bind-attr href=collapsibleBodyLink}}>

could look like this to solve the problem:

<a {{bind-attr class=":accordion-toggle open::collapsed"}} data-toggle="collapse" data-parent="#accordion" {{bind-attr href=collapsibleBodyLink}}>

Perhaps you'd prefer this to be solved through JS, but say the word and I'll submit a PR with this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions