Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Accordion wont apply panel-open class when initially opened and custom class binding is used #4849

Closed
ghost opened this issue Nov 9, 2015 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 9, 2015

I use the accordion with dynamic class names. I'm using angular bindings for this. As in current version this is not supported via ng-class and the panel-class attribute is only evaluated once, I have to use the standard class attribute. So I do sth like this:

<accordion-group class={{customClass}} is-open="true"></accordion-group>

Where {{customClass}} will be replaced by "myCustomClass". When the is-open attribute is set by default and I navigate to the page with the accordion, the class attribute evaluates to:

<accordion-group class="myCustomClass panel panel-default panel panel-default" is-open="true"></accordion-group>

But "panel-open" will only be applied if I close and reopen the affected group. You may look this up here and check the class value via debugger (I've just added a constant class="testClass" in my example as the result is the same):

http://plnkr.co/edit/cOJDzM2lYdVkA9TWmBDP?p=preview

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant