mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-05-08 06:14:41 +02:00
fix: Update filtered count badge when type filter returns empty results
The filteredCountBadge in "Add Filtered" button was not updating when unchecking type filter checkboxes resulted in zero matching contacts. Now resets badge to '0' and clears filteredPendingContacts array. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -701,6 +701,11 @@ async function loadPendingContacts() {
|
||||
// Show empty state
|
||||
if (emptyEl) emptyEl.style.display = 'block';
|
||||
if (countBadge) countBadge.style.display = 'none';
|
||||
|
||||
// Reset filtered count badge when no contacts match type filter
|
||||
const filteredCountBadge = document.getElementById('filteredCountBadge');
|
||||
if (filteredCountBadge) filteredCountBadge.textContent = '0';
|
||||
filteredPendingContacts = [];
|
||||
} else {
|
||||
// Initialize filtered list and apply filters (default: CLI only)
|
||||
filteredPendingContacts = [...pendingContacts];
|
||||
|
||||
Reference in New Issue
Block a user