From a03612dc9c9ec79b9240a511d7edfce8482c57a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Sun, 22 Feb 2026 12:16:39 +0100 Subject: [PATCH] Set active state on selected filter widgets --- contao/templates/frontend/event_filter.html.twig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contao/templates/frontend/event_filter.html.twig b/contao/templates/frontend/event_filter.html.twig index 44ef145..93f468d 100644 --- a/contao/templates/frontend/event_filter.html.twig +++ b/contao/templates/frontend/event_filter.html.twig @@ -97,6 +97,8 @@ const tagButtons = Array.from(filters.querySelectorAll('button[data-filter-tag]')); const locationSelect = filters.querySelector('#location-filter'); const orgSelect = filters.querySelector('#org-filter'); + const locationWidget = locationSelect?.closest('.widget-select'); + const orgWidget = orgSelect?.closest('.widget-select'); const status = filters.querySelector('#eventfilter-status'); const animationMs = 220; @@ -142,10 +144,12 @@ if (locationSelect) { locationSelect.classList.toggle('active', type === 'location'); + locationWidget?.classList.toggle('active', type === 'location'); } if (orgSelect) { orgSelect.classList.toggle('active', type === 'org'); + orgWidget?.classList.toggle('active', type === 'org'); } };