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

Accordian: isOpen fails to work with ngRepeat #82

Closed
sudhakar opened this issue Jan 22, 2013 · 5 comments
Closed

Accordian: isOpen fails to work with ngRepeat #82

sudhakar opened this issue Jan 22, 2013 · 5 comments
Assignees
Milestone

Comments

@sudhakar
Copy link

By default I want the first accordian-group to be open when loaded initially. So for that I have set isOpen to true in first accordian like

<accordion-group heading="First Header" is-open="true">

Although this works fine for static content, but when I start adding dynamic content using ngRepeat, it fails.

  <accordion>
    <accordion-group heading="First Header" is-open="true">
      <div ng-repeat="item in items">{{item}}</div>
    </accordion-group>
    <accordion-group heading="Second Header">
      You can toggle to second group ofcourse..
    </accordion-group>
  </accordion>

Here's the plunker http://plnkr.co/edit/YcDRVJ?p=preview

@petebacondarwin
Copy link
Member

Yes, this is a bug with the way that the collapse is handling its initial transition - it seems to be stuck at height: 19px rather than reverting to height: auto.

@ghost ghost assigned petebacondarwin Jan 22, 2013
@johntom
Copy link

johntom commented Jan 23, 2013

As a work-a-round put the is-open='true' on the last group

@sudhakar
Copy link
Author

@johntom Doesnt seems to work for me. Here's plnkr http://plnkr.co/edit/D21gzT?p=preview

@johntom
Copy link

johntom commented Jan 23, 2013

Ok, I looked at my example where I use jade and got it working, Idea is to have it fit in one line. Thus items 2 and 3 work with is open while 1 has problem.
http://plnkr.co/edit/5Zk5P7?p=preview

@smallg
Copy link

smallg commented Sep 4, 2013

very useful

codedogfish pushed a commit to codedogfish/angular-ui-bootstrap that referenced this issue Sep 15, 2015
Reset activeIndex on popup close in case we highlighted another choice without selecting it
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

5 participants