1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 10:43:35 +00:00

Refactor to use virtual-scroll more selectively

This commit is contained in:
Thomas Rittson
2021-05-21 12:42:56 +10:00
parent 9e5869773d
commit 6b954df58c
7 changed files with 84 additions and 33 deletions

View File

@@ -63,15 +63,17 @@
</button>
</ng-container>
</div>
<div class="box list only-list" *ngIf="ciphers.length">
<div class="box-header">
{{groupingTitle}}
<span class="flex-right">{{isSearching() ? ciphers.length : ciphers.length}}</span>
<cdk-virtual-scroll-viewport itemSize="46" *ngIf="ciphers.length" #virtualScrollViewport>
<div class="box list only-list">
<div class="box-header">
{{groupingTitle}}
<span class="flex-right">{{isSearching() ? ciphers.length : ciphers.length}}</span>
</div>
<div class="box-content">
<app-cipher-row *cdkVirtualFor="let c of ciphers" [cipher]="c" title="{{'viewItem' | i18n}}"
(onSelected)="selectCipher($event)" (launchEvent)="launchCipher($event)"></app-cipher-row>
</div>
</div>
<div class="box-content">
<app-ciphers-list [ciphers]="ciphers" title="{{'viewItem' | i18n}}"
(onSelected)="selectCipher($event)" (launchEvent)="launchCipher($event)"></app-ciphers-list>
</div>
</div>
</cdk-virtual-scroll-viewport>
</ng-container>
</content>