Fix industry filter badge and event isolation

This commit is contained in:
Ozzy (AI Assistant) 2026-07-27 18:46:41 +00:00
parent a28acf7c13
commit d14148781f

View file

@ -268,10 +268,16 @@
btn.classList.add('active'); btn.classList.add('active');
activeFilter = btn.dataset.filter; activeFilter = btn.dataset.filter;
render(); render();
// Update the filter toggle badge
const badge = document.getElementById('filterBadge');
if (badge) badge.textContent = btn.textContent;
}); });
// ─── Initial Render ─────────────────────────────────────────────── // ─── Initial Render ───────────────────────────────────────────────
render(); render();
// Set initial badge
const initBadge = document.getElementById('filterBadge');
if (initBadge) initBadge.textContent = document.querySelector('.industry-btn.active')?.textContent || 'All';
function toggleFilters() { function toggleFilters() {
const container = document.getElementById('industryFilters'); const container = document.getElementById('industryFilters');