fix: update contacts count on search, remove table for no contacts
This commit is contained in:
@@ -2,10 +2,13 @@
|
|||||||
<div class="contact-list__container">
|
<div class="contact-list__container">
|
||||||
<h2>{{languageManager.strings.contacts|upperfirst}}</h2>
|
<h2>{{languageManager.strings.contacts|upperfirst}}</h2>
|
||||||
<app-contact-search-bar (contactSearch)="filter=$event"/>
|
<app-contact-search-bar (contactSearch)="filter=$event"/>
|
||||||
|
@let contactsCount = (this.contacts$|async|contactsFilter:filter)?.length ?? 0;
|
||||||
<app-counter
|
<app-counter
|
||||||
[count]="(this.contacts$|async)?.length ?? 0"
|
[count]="contactsCount"
|
||||||
item="{{languageManager.strings.contacts}}"
|
item="{{languageManager.strings.contacts}}"
|
||||||
/>
|
/>
|
||||||
|
@if(contactsCount !== 0) {
|
||||||
<app-contact-list-table [contactList]="(this.contacts$|async)|contactsFilter:filter"/>
|
<app-contact-list-table [contactList]="(this.contacts$|async)|contactsFilter:filter"/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Reference in New Issue
Block a user