Commit 0fb45425bb8a8d28a91c3142cb7c0a8b7321ea97
Committed by
Igor Kulikov
1 parent
347ac991
fix entities-table widget for wrong dataKey value when same key is used on multi…
…ple columns with different processing function (#1827)
Showing
1 changed file
with
4 additions
and
4 deletions
... | ... | @@ -390,7 +390,7 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
390 | 390 | ); |
391 | 391 | |
392 | 392 | function getEntityValue(entity, key) { |
393 | - return getDescendantProp(entity, key.name); | |
393 | + return getDescendantProp(entity, key.label); | |
394 | 394 | } |
395 | 395 | |
396 | 396 | function updateEntitiesData(data) { |
... | ... | @@ -403,9 +403,9 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
403 | 403 | var keyData = data[index].data; |
404 | 404 | if (keyData && keyData.length && keyData[0].length > 1) { |
405 | 405 | var value = keyData[0][1]; |
406 | - entity[dataKey.name] = value; | |
406 | + entity[dataKey.label] = value; | |
407 | 407 | } else { |
408 | - entity[dataKey.name] = ''; | |
408 | + entity[dataKey.label] = ''; | |
409 | 409 | } |
410 | 410 | } |
411 | 411 | } |
... | ... | @@ -568,7 +568,7 @@ function EntitiesTableWidgetController($element, $scope, $filter, $mdMedia, $mdP |
568 | 568 | } |
569 | 569 | for (d = 0; d < vm.dataKeys.length; d++) { |
570 | 570 | dataKey = vm.dataKeys[d]; |
571 | - entity[dataKey.name] = ''; | |
571 | + entity[dataKey.label] = ''; | |
572 | 572 | } |
573 | 573 | vm.allEntities.push(entity); |
574 | 574 | } | ... | ... |