Skip to content
Snippets Groups Projects
Commit a9020ca2 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh
Browse files

track by $index to prevent angular from trying to mod immut obj

parent cf734d89
No related branches found
No related tags found
1 merge request!223Reports overhaul
......@@ -45,7 +45,7 @@ angular.module('reportApp').directive("groupsLayout", ['GroupsService', function
<div id='groupsLayout' class='panel-group'>
<div
group-panel-content
ng-repeat='group in groups'
ng-repeat='group in groups track by $index'
group='group'
>
</div>
......
......@@ -36,7 +36,7 @@ angular.module('reportApp').directive("groupPanelItems", [function(){
<div>
<div
group-item-container
ng-repeat='item in group.reportItems'
ng-repeat='item in group.reportItems track by $index'
group='group'
report-item='item'
style='margin-bottom: 5px;'
......
......@@ -172,7 +172,7 @@ angular.module('reportApp')
<table class="table table-striped table-hover">
<thead>
<tr>
<th ng-repeat='field in fields'>
<th ng-repeat='field in fields track by $index'>
<span
ng-if="sortField.val == field"
class='glyphicon'
......@@ -190,7 +190,7 @@ angular.module('reportApp')
</thead>
<tbody>
<tr ng-repeat="exp in group.experiments | orderBy:sortFunc:sortField.isReversed">
<td ng-repeat='field in fields'>
<td ng-repeat='field in fields track by $index'>
{{ getFieldVal(exp, field) }}
</td>
</tr>
......
......@@ -49,7 +49,6 @@ angular.module('reportApp')
scope.compileContent = () => {
let url = UrlService.getCompileRstUrl();
let mapToTextBlock = `${scope.group.name}|${scope.group.reportItems.indexOf(scope.reportItem)}`;
console.log(mapToTextBlock);
return reportFactory.compileRST(url, mapToTextBlock)
.then(data => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment