Default field for boolean property doesn't load field-boolean.js
Entity has a boolean property, e.g. "enabled"
On the index page when do not use "configureFields" method or use yield Field::new('enabled') it renders switch but it doesn't work correctly because there is no saving request on the switch's change.
This is because asset file field-boolean.js is not in the js assets list in this case and not loaded
If explicity set yield BooleanField::new('enabled'); it works good, the asset filefield-boolean.js loaded as well
SF verion 6.4 EA version 4.1
It is because assets includes in BooleanField::new explicitly.
https://github.com/EasyCorp/EasyAdminBundle/blob/6248349de0e108640b78bef70656db6f35f7386c/src/Field/BooleanField.php#L38
Field::new magic does not work there
I stumbled over it years ago, and decided to explicitly create not standard fields.
Just don't quite understand why the js file can't be loaded by default when Field::new rendered as boolean switch. For simple CRUD controllers this will avoid having to manually specify form fields and update it each time the source table changed Besides it took much time to In addition, it is not intuitive, because you expect that the field should work, but it does not Anyway, thank you for the response. At least I know there it's not a bug but a feature :)
At least I know there it's not a bug but a feature :)
I did not not say that. I also consider it as bug, but lazy to find a way to fix it )