-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Accordion: add a class at the panel level to indicate open state #3419
Comments
This is a trivial change, simple as changing the template for the accordion-group to something like:
My only concerns are:
|
@RobJacobs thanks for considering this. For 1. would a broadcast and on be any better? over on bootstrap's example the styling could then be: .panel-title > a[aria-expanded]:before {
content: $fa-var-angle-right;
font: normal normal normal 14px/1 FontAwesome; }
.panel-title > a[aria-expanded=true]:before {
content: $fa-var-angle-down; } |
I would argue that using events for something like this is wrong. I would consider adding a class such that no actual CSS is tied to the name. The CSS class I'm ok with this change. @RobJacobs do you want to create the PR or would you like me to? |
UPDATED the Just an update on this. |
- add `open` class to `.panel-collapse` when open. - fix missing closing `<` on test. fixes angular-ui#3419
I think this is ok - adding another two $watches is not the greatest, but this beats putting an ng-class on the accordion-group and it transcluding that so there are 4 $watches as a result. |
This commit broke my page, I can no longer use |
* updat breaking changes section to include angular-ui#3419
Would you add a class to indicate the panel is open at the panel level?
I'm using a caret indicator in the
panel-title
like so:Adding a class like
panel-open
on the panel div would allow me to just go likeinstead of
The text was updated successfully, but these errors were encountered: