track repeaters by index #88

This commit is contained in:
Kyle Spearrin 2017-02-17 23:35:36 -05:00
parent 8a2510bcb1
commit 7dc551a815
6 changed files with 10 additions and 8 deletions

View File

@ -9,7 +9,8 @@
<div class="list">
<div class="list-grouped">
<a href="javascript:void(0)" ng-click="fillLogin(login)" class="list-grouped-item condensed"
title="{{i18n.autoFill}} {{login.name}}" ng-repeat="login in theLogins = (logins | orderBy: ['name', 'username'])">
title="{{i18n.autoFill}} {{login.name}}"
ng-repeat="login in theLogins = (logins | orderBy: ['name', 'username']) track by $index">
<span class="btn-list" href="" ng-click="$event.stopPropagation()" title="{{i18n.copyPassword}}"
ngclipboard ngclipboard-error="clipboardError(e)"
ngclipboard-success="clipboardSuccess(e, i18n.password)"

View File

@ -12,7 +12,7 @@
<div class="list">
<div class="list-grouped">
<a href="" ng-click="editFolder(folder)" class="list-grouped-item"
ng-repeat="folder in theFolders = (folders | orderBy: ['name'])">
ng-repeat="folder in theFolders = (folders | orderBy: ['name']) track by $index">
<span class="text">{{folder.name}}</span>
</a>
</div>

View File

@ -16,7 +16,7 @@
<span>{{vaultFolders.length}}</span>
</div>
<a href="javascript:void(0)" ng-click="viewFolder(folder)" class="list-section-item"
ng-repeat="folder in vaultFolders | orderBy: folderSort">
ng-repeat="folder in vaultFolders | orderBy: folderSort track by $index">
{{folder.name}}
<i class="fa fa-chevron-right fa-lg"></i>
<span class="item-sub-label">{{folder.itemCount}}</span>
@ -26,7 +26,8 @@
</div>
<div ng-if="vaultLogins.length && (vaultLogins.length < 100 || (searchText && searchText.length >= 2))">
<div class="list">
<div class="list-grouped" ng-repeat="folder in vaultFolders | orderBy: folderSort" ng-show="vaultFolderLogins.length">
<div class="list-grouped" ng-repeat="folder in vaultFolders | orderBy: folderSort track by $index"
ng-show="vaultFolderLogins.length">
<div class="list-grouped-header">
<small>{{vaultFolderLogins.length}}</small>
<i class="fa fa-folder-open"></i> {{folder.name}}
@ -34,7 +35,7 @@
<a href="javascript:void(0)" ng-click="viewLogin(login)"
class="list-grouped-item condensed" title="{{i18n.edit}} {{login.name}}"
ng-repeat="login in vaultFolderLogins = (vaultLogins | filter: { folderId: folder.id }
| filter: searchLogins() | orderBy: ['name', 'username'])">
| filter: searchLogins() | orderBy: ['name', 'username']) track by $index">
<span class="btn-list" ng-click="$event.stopPropagation()" title="{{i18n.copyPassword}}" ngclipboard
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.password)"
data-clipboard-text="{{login.password}}" ng-class="{'disabled': !login.password}">

View File

@ -43,7 +43,7 @@
<div class="list-section-item">
<label for="folder" class="item-label">{{i18n.folder}}</label>
<select id="folder" name="FolderId" ng-model="login.folderId">
<option ng-repeat="folder in folders | orderBy: ['name']" value="{{folder.id}}">
<option ng-repeat="folder in folders | orderBy: ['name'] track by $index" value="{{folder.id}}">
{{folder.name}}
</option>
</select>

View File

@ -43,7 +43,7 @@
<div class="list-section-item">
<label for="folder" class="item-label">{{i18n.folder}}</label>
<select id="folder" name="FolderId" ng-model="login.folderId">
<option ng-repeat="folder in folders | orderBy: ['name']" value="{{folder.id}}">
<option ng-repeat="folder in folders | orderBy: ['name'] track by $index" value="{{folder.id}}">
{{folder.name}}
</option>
</select>

View File

@ -21,7 +21,7 @@
</div>
<a href="javascript:void(0)" ng-click="viewLogin(login)"
class="list-section-item condensed" title="{{i18n.edit}} {{login.name}}"
ng-repeat="login in pagedVaultLogins">
ng-repeat="login in pagedVaultLogins track by $index">
<span class="btn-list" ng-click="$event.stopPropagation()" title="{{i18n.copyPassword}}" ngclipboard
ngclipboard-error="clipboardError(e)" ngclipboard-success="clipboardSuccess(e, i18n.password)"
data-clipboard-text="{{login.password}}" ng-class="{'disabled': !login.password}">