From 1f450c5f4bf91b12ad9c595f3e22dc364b0bd6e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 9 Jan 2025 17:40:17 +0100 Subject: [PATCH] Revert "disabled class on a i.delete.icon selector has no effect" This reverts commit 9947aa97b9ef4d926ea52f8fc8183e79ea39f87f. --- src/Form/Control/Dropdown.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Form/Control/Dropdown.php b/src/Form/Control/Dropdown.php index a55c980843..b02782128a 100644 --- a/src/Form/Control/Dropdown.php +++ b/src/Form/Control/Dropdown.php @@ -204,6 +204,12 @@ protected function renderView(): void $this->template->dangerouslySetHtml('multipleClass', 'multiple'); } + if ($this->disabled || $this->readOnly) { + if ($this->multiple) { + $this->jsDropdown(true)->find('a i.delete.icon')->attr('class', 'disabled'); + } + } + if ($this->disabled) { $this->template->set('disabledClass', 'disabled'); $this->template->dangerouslySetHtml('disabled', 'disabled="disabled"');