Fix industry filter badge and event isolation
This commit is contained in:
parent
a28acf7c13
commit
d14148781f
1 changed files with 6 additions and 0 deletions
|
|
@ -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');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue