Commit 7f2f1d05 authored by David Burke's avatar David Burke

Fixed virtual scroll height issue! yay

parent a790accb
Pipeline #38698646 passed with stage
in 5 minutes and 1 second
......@@ -16,36 +16,18 @@
(searchTerm)="searchUpdate.emit($event)"
class="popup__search"></search>
<div *ngIf="matchedSecrets.length">
<div class="popup__password-list-header popup__password-list-header--matched">Passwords associated with this site</div>
<div *ngFor="let secret of matchedSecrets">
<app-popup-item
[secret]="secret"
[isSelected]="secret.id === selectedSecret"
[formFillMessage]="formFillMessage"
[usernameCopied]="secret.id === usernameCopied"
[passwordCopied]="secret.id === passwordCopied"
isMatched="true"
(autofill)="signIn.emit(secret)"
(openUrl)="openUrl.emit(secret)"
(onCopyUsername)="onCopyUsername.emit(secret)"
(onCopyPassword)="onCopyPassword.emit(secret)"
(setSelected)="setSelected.emit($event)"
(closeSelected)="setSelected.emit()"
(onDetail)="onDetail.emit(secret)">
></app-popup-item>
</div>
</div>
<cdk-virtual-scroll-viewport class="viewport" [itemSize]="69">
<div class="popup__password-list-header" *ngIf="matchedSecrets.length > 0">All Passwords</div>
<div *cdkVirtualFor="let secret of secrets" class="item">
<div *ngIf="matchedSecrets.length" class="popup__password-list-header popup__password-list-header--matched">Passwords associated with this site</div>
<!-- We must combine managed and all secrets in one VirtualFor as it should all scroll -->
<div *cdkVirtualFor="let secret of matchedSecrets.concat(secrets); let i = index" class="item">
<div class="popup__password-list-header" *ngIf="matchedSecrets.length > 0 && i === matchedSecrets.length">All Passwords</div>
<app-popup-item
[secret]="secret"
[isSelected]="secret.id === selectedSecret"
[formFillMessage]="formFillMessage"
[usernameCopied]="secret.id === usernameCopied"
[passwordCopied]="secret.id === passwordCopied"
[isMatched]="matchedSecrets.length > i"
(openUrl)="openUrl.emit(secret)"
(onCopyUsername)="onCopyUsername.emit(secret)"
(onCopyPassword)="onCopyPassword.emit(secret)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment