From 24e5fb7faa9d3712d8315a5f4a57c5b978177def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Fri, 12 Apr 2024 11:33:40 +0200 Subject: [PATCH] Move active class to dropdown item --- src/UI/Actions/Controls/Dropdown.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/UI/Actions/Controls/Dropdown.php b/src/UI/Actions/Controls/Dropdown.php index 7d61482..3dbd2a3 100644 --- a/src/UI/Actions/Controls/Dropdown.php +++ b/src/UI/Actions/Controls/Dropdown.php @@ -60,6 +60,10 @@ public function create(): Html $element->setClass('dropdown-item'); } + if ($action->hasClass('active')) { + $element->addClass('active'); + } + if ($action->hasClass('ajax')) { $element->addClass('ajax'); }