You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, I have the same problem on the latest version of EasyAdmin. I've also attempted to run php bin/console asset:install again to fix other issues, but this prevails with me.
Hey, found the problem, it's in easyadmin-bundle/src/Field/Configurator/BooleanConfigurator.php
// this happens when processing fields not for a specific entity (e.g. when
// rendering the filters from the 'index' page)
if (null === $entityDto->getPrimaryKeyValue()) {
$field->setCustomOption(BooleanField::OPTION_RENDER_AS_SWITCH, false);
return;
}
This is what breaks it. Just updated and saw it happening. The problem is the specific check for getPrimaryKeyValue.
I tested by commenting it and it works, doesn't break the filters or anything else I saw.
My problem is when the entity is part of a collection in another entity.
The fix is easy but I'm not sure why was this piece of code added.
on the "add new" action, boolean fields are now rendered without the form-switch class. only normal checkboxes are displayed.
Does anyone have a similar problem?
The text was updated successfully, but these errors were encountered: