EasyCorp / EasyAdminBundle

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
MIT License
4.05k stars 1.02k forks source link

Keep submenus expanded also in NEW, EDIT and DETAIL pages, or provide a ->setExpanded() method on submenu items #6366

Closed nevez closed 2 months ago

nevez commented 2 months ago

When in the main menu I put a submenu and I put a CRUD link in it, it stays open while on the INDEX page of the CRUD, but closes automatically as soon as I modify or create a new entity.

If this is the intended behaviour, it would be nice if the menu state was at least configurable by providing a ->setExpanded(true/false) method on the submenu item itself. This way the user has a way to override the default behaviour.

Thank you

dwd-akira commented 2 months ago

It's a bug : #6082

treeindark commented 2 months ago

Not fixed since december ?

pfpro commented 2 months ago

Interestingly, nothing has changed in the behavior of the sidebar menu in my use case.

1

The respective entity (l.companies) is, however, assigned to a higher-level menu node (l.crm):

___u2

Regardless of whether in the INDEX, DETAIL, NEW or EDIT page, no (parent) menu node (l.crm) is opened or highlighted.

e.g. /admin?crudAction=index&crudControllerFqcn=App%5CController%5CBackend%5CEasyadmin%5CCrud%5CCrm%5CCompanyCrudController

2

The same applies to my user-defined routes

e.g. /admin?routeName=backend_app_filemanager

I would be interested in the experience of other developers. Maybe someone can point me in the right direction Happy easy admin!