From 15db77186bf5c6210d1c5a4d34f97e7f2389eb22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Mummert?= Date: Mon, 23 Feb 2026 20:38:21 +0100 Subject: [PATCH] Add Tom Select arrow and disable input autocomplete --- .../templates/frontend/event_filter.html.twig | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/contao/templates/frontend/event_filter.html.twig b/contao/templates/frontend/event_filter.html.twig index 950eb1f..8fa0626 100644 --- a/contao/templates/frontend/event_filter.html.twig +++ b/contao/templates/frontend/event_filter.html.twig @@ -82,6 +82,30 @@ display: none; } + #eventfilters .ts-wrapper.single .ts-control { + position: relative; + padding-right: 2rem; + } + + #eventfilters .ts-wrapper.single .ts-control::after { + content: ''; + position: absolute; + right: 0.75rem; + top: 50%; + width: 0; + height: 0; + border-left: 0.3rem solid transparent; + border-right: 0.3rem solid transparent; + border-top: 0.4rem solid currentColor; + transform: translateY(-30%); + pointer-events: none; + opacity: 0.7; + } + + #eventfilters .ts-wrapper.single.dropdown-active .ts-control::after { + transform: translateY(-65%) rotate(180deg); + } + @@ -129,6 +153,17 @@ field: 'text', direction: 'asc', }, + onInitialize() { + if (!this.control_input) { + return; + } + + this.control_input.setAttribute('autocomplete', 'off'); + this.control_input.setAttribute('autocorrect', 'off'); + this.control_input.setAttribute('autocapitalize', 'off'); + this.control_input.setAttribute('spellcheck', 'false'); + this.control_input.setAttribute('name', `${selectElement.id}-ts-input`); + }, }); };