Skip to content

Commit 89d2ec2

Browse files
committed
Add track by to container repeat for env vars
Avoids some issues where the page flickers on updates and prevents the dropdown from closing when open during a background update.
1 parent 57ae92d commit 89d2ec2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/directives/edit-environment-variables.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<form ng-if="$ctrl.apiObject" name="$ctrl.form" class="mar-bottom-xl">
22
<confirm-on-exit ng-if="$ctrl.canIUpdate && !$ctrl.ngReadonly" dirty="$ctrl.form.$dirty"></confirm-on-exit>
3-
<div ng-repeat="container in $ctrl.containers">
3+
<div ng-repeat="container in $ctrl.containers track by container.name">
44
<h3>Container {{container.name}}</h3>
55

66
<div ng-if="!$ctrl.canIUpdate || $ctrl.ngReadonly">

dist/scripts/templates.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6811,7 +6811,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
68116811
$templateCache.put('views/directives/edit-environment-variables.html',
68126812
"<form ng-if=\"$ctrl.apiObject\" name=\"$ctrl.form\" class=\"mar-bottom-xl\">\n" +
68136813
"<confirm-on-exit ng-if=\"$ctrl.canIUpdate && !$ctrl.ngReadonly\" dirty=\"$ctrl.form.$dirty\"></confirm-on-exit>\n" +
6814-
"<div ng-repeat=\"container in $ctrl.containers\">\n" +
6814+
"<div ng-repeat=\"container in $ctrl.containers track by container.name\">\n" +
68156815
"<h3>Container {{container.name}}</h3>\n" +
68166816
"<div ng-if=\"!$ctrl.canIUpdate || $ctrl.ngReadonly\">\n" +
68176817
"<span ng-if=\"!container.env.length\">\n" +

0 commit comments

Comments
 (0)