From 1fde92ab56afd362a30c6eecfc68166e17350126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Sat, 1 Jun 2024 20:59:03 +0200 Subject: [PATCH] Revert "disabled class on a i.delete.icon selector has no effect" This reverts commit d09c6ddc9842d50cac16c807dd88a2b9438711ca. --- 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 c33db75dfd..d8621ce902 100644 --- a/src/Form/Control/Dropdown.php +++ b/src/Form/Control/Dropdown.php @@ -201,6 +201,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"');