[>=4.20.8
] Missing active
CSS class on Dashboard route
#6701
Labels
Milestone
>=4.20.8
] Missing active
CSS class on Dashboard route
#6701
Describe the bug
When accessing the Dashboard, the menù item is not highlighted as active anymore.
To Reproduce
Login in EasyAdmin: the Dashboard route is not highlighted.
(OPTIONAL) Additional context
Before
4.20.8
, theli
tag had the css classactive
: it visually highlights the current route. This is missed only on Dashboard.The problem seems in
\EasyCorp\Bundle\EasyAdminBundle\Dto\MenuItemDto::$selected
: the property is not set totrue
anymore and this prevents the templatemenu.html.twig
to recognize the route as the active one:EasyAdminBundle/templates/menu.html.twig
Line 14 in b76eca4
Digging deeper in the code, seems that this snippet caused the issue:
EasyAdminBundle/src/EventListener/AdminRouterSubscriber.php
Lines 69 to 72 in b76eca4
The route, infact, has the request attribute
routeCreatedByEasyAdmin
tofalse
: this leads to thereturn
and theMenuItemDto
doesn't have propertyactive
set totrue
.However, commenting the
return
, leads to an error, so this doesn't seem the right path to follow.I'm not so versed in EasyAdmin to fix the issue and submit a PR: sorry 😔
The text was updated successfully, but these errors were encountered: