loaded so that we dont see a flash of no items

This commit is contained in:
Kyle Spearrin 2018-01-31 21:59:39 -05:00
parent 77d1d272cc
commit 1925f74cb5
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
<span class="detail">{{c.subTitle}}</span>
</a>
</div>
<div *ngIf="searchedCiphers.length === 0" class="no-items">
<div *ngIf="loaded && searchedCiphers.length === 0" class="no-items">
<i class="fa fa-frown-o fa-4x"></i>
<p>{{'noItemsInList' | i18n}}</p>
<button (click)="addCipher()" class="btn block primary link">{{'addItem' | i18n}}</button>

View File

@ -20,6 +20,7 @@ export class CiphersComponent {
@Output() onCipherClicked = new EventEmitter<CipherView>();
@Output() onAddCipher = new EventEmitter();
loaded: boolean = false;
ciphers: CipherView[] = [];
searchText: string;
searchPlaceholder: string = null;
@ -36,6 +37,8 @@ export class CiphersComponent {
} else {
this.ciphers = ciphers.filter(this.filter);
}
this.loaded = true;
}
async refresh() {