EasyAdminBundle
EasyAdminBundle copied to clipboard
Autocomplete in collection field with useEntryCrudForm
Describe the bug
When we try to implement a CollectionField :
CollectionField::new('items')
->setEntryIsComplex()
->useEntryCrudForm(ItemCrudController::class);
And in ItemCrudController::configureFields
AssociationField::new('otherEntity')->autocomplete(),
we will get : Call to a member function getCustomOption() on null because in EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController::autocomplete() the
$field = FieldCollection::new($controller->configureFields($autocompleteContext['originatingPage']))->getByProperty($autocompleteContext['propertyName']); is null
Not found how to fix it ?!