angular.dart.ui
angular.dart.ui copied to clipboard
Accordion: ng-repeat on accordion-group does not refresh the view when the model changes
We have the following html template using the accordion component:
...
<accordion close-others="false">
<accordion-group is-open="true" ng-repeat="project in projects" heading="{{project}}">
<project-component project-name="{{project}}" project-queues="queuesForProject(project)"...
<accordion-group is-open="true" ng-repeat="project in projects" heading="{{project}}">
...
The component managing the view above manages the projects field:
@Component(selector: 'queues-component', templateUrl: 'queuesView.html', useShadowDom: false)
class QueuesComponent implements ScopeAware, AttachAware, DetachAware {
...
List<String> projects = [];
...
Whenever projects list changes (e.g. a new element is added to the list), the accordion-group is not redrawn. However, if we get rid of the accordion and we put the ng-repeat on a div, any change on the projects list is taken into account by the view.
Have you guys noticed any similar behaviour? any clue what are we doing wrong here?
I have fixed other issues with Accordion component. Can you try 0.6.5 and confirm you problem still exists?
We have tried with 0.6.8 and the issue still persists when repeating over a list of strings. However, we have solved our problem by repeating over a list of objects, which works fine.
I'm glad to hear about that. So let's check what's wrong with list of string.
On 12 March 2015 at 03:56, Fede Lopez [email protected] wrote:
We have tried with 0.6.8 and the issue still persists when repeating over a list of strings. However, we have solved our problem by repeating over a list of objects, which works fine.
— Reply to this email directly or view it on GitHub https://github.com/akserg/angular.dart.ui/issues/149#issuecomment-78410377 .