-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
is-open
handling for dynamic groups
Closes #1297
- Loading branch information
There are no files selected for viewing
4 comments
on commit 9ec2128
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made these changes to my js file, but it still didn't work. Is it even supposed to work, or are there also some other changes elsewhere that don't show here? I spent a couple of hours trying to create a plunker but failed miserably and gave up.
My arrangement is such that there is a "tabset" with a few tabs created dynamically with an "ng-repeat". On one of the tabs I do something that broadcasts an event in $rootScope, which is caught by a controller for another tab with the accordions on it. Depending on the event parameters one or more accordions should open up but nothing happens even after including the fix shown up there.
And after this when I click the accordion that should have opened, it seems to open up briefly just to close again immediately. Clearly the component's state is "open" but the UI thinks otherwise.
When I change to version 0.6.0 it works fine and it's good enough for me for now. I'm simply concerned that 0.8.0 will still be broken for my project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sanaliekki Please provide a minimal reproduce scenario, otherwise we cannot understand the actual problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bekos Sorry, I tried with plunker but being a n00b I couldn't make it work at all and can't spare enough time right now to try again.. Maybe later.
But it's okay, at least it's working with 0.6.0. I guess the problem could very well be on this end. I just thought I'd try to describe my conundrum in case there's something you missed with the fix... like... do the accordions (and accordion groups) work under tabs that are created dynamically with "ng-repeat"?
I'm still having problems with initializing "ng-grids" in a tab that is inactive. They don't show at all unless I manually rebuild the grid... and I thought this could be something similar.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bekos Hi, I was finally able to make the plunker work: http://plnkr.co/edit/eQiEspAI3DTLHptHr81f?p=preview
Trying to use the "Open..." buttons leaves the accordions somehow in an intermediate state.
The checkboxes on the second pane are bound to the accordions' "is-open" property so you can see if the accordion should be open or closed.
And obviously you can manipulate the "is-open" property also by clicking the checkboxes, which works perfectly.
This is definitely the way to go. isOpen is a model and must have a dot in the expression. 👍