EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

All menu items get active state for same CrudController with another setQueryParameter is in the menu

Open kolobok22 opened this issue 1 year ago • 0 comments

I want to display a list of schools (projects) so that I can go from the menu to the list of applicants in each school. but when you click on one school, all schools are highlighted

public function configureMenuItems(): iterable
{  
        $projects = $this->projectRepository->findAll();  
        foreach ($projects as $project) {  
            yield MenuItem::subMenu($project->getName(), 'fa fa-users')->setSubItems([
                MenuItem::linkToCrud('Applicant', 'fa-solid fa-users-line', Applicant::class)
                    ->setQueryParameter('filters[project]',[ 'comparison' => '=', 'value' => $project->getId() ])
                    ->setController(ApplicantCrudController::class)
                ,
            ]);
        }
}

2024-07-11 08-17-04

or is this the wrong approach?

kolobok22 avatar Jul 11 '24 05:07 kolobok22