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 ...@@ -45,7 +45,7 @@ angular.module('reportApp').directive("groupsLayout", ['GroupsService', function
<div id='groupsLayout' class='panel-group'> <div id='groupsLayout' class='panel-group'>
<div <div
group-panel-content group-panel-content
ng-repeat='group in groups' ng-repeat='group in groups track by $index'
group='group' group='group'
> >
</div> </div>
......
...@@ -36,7 +36,7 @@ angular.module('reportApp').directive("groupPanelItems", [function(){ ...@@ -36,7 +36,7 @@ angular.module('reportApp').directive("groupPanelItems", [function(){
<div> <div>
<div <div
group-item-container group-item-container
ng-repeat='item in group.reportItems' ng-repeat='item in group.reportItems track by $index'
group='group' group='group'
report-item='item' report-item='item'
style='margin-bottom: 5px;' style='margin-bottom: 5px;'
......
...@@ -172,7 +172,7 @@ angular.module('reportApp') ...@@ -172,7 +172,7 @@ angular.module('reportApp')
<table class="table table-striped table-hover"> <table class="table table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th ng-repeat='field in fields'> <th ng-repeat='field in fields track by $index'>
<span <span
ng-if="sortField.val == field" ng-if="sortField.val == field"
class='glyphicon' class='glyphicon'
...@@ -190,7 +190,7 @@ angular.module('reportApp') ...@@ -190,7 +190,7 @@ angular.module('reportApp')
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="exp in group.experiments | orderBy:sortFunc:sortField.isReversed"> <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) }} {{ getFieldVal(exp, field) }}
</td> </td>
</tr> </tr>
......
...@@ -49,7 +49,6 @@ angular.module('reportApp') ...@@ -49,7 +49,6 @@ angular.module('reportApp')
scope.compileContent = () => { scope.compileContent = () => {
let url = UrlService.getCompileRstUrl(); let url = UrlService.getCompileRstUrl();
let mapToTextBlock = `${scope.group.name}|${scope.group.reportItems.indexOf(scope.reportItem)}`; let mapToTextBlock = `${scope.group.name}|${scope.group.reportItems.indexOf(scope.reportItem)}`;
console.log(mapToTextBlock);
return reportFactory.compileRST(url, mapToTextBlock) return reportFactory.compileRST(url, mapToTextBlock)
.then(data => { .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