-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default field for boolean property doesn't load field-boolean.js #6297
Comments
It is because assets includes in
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 |
I did not not say that. |
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 loadedIf explicity set
yield BooleanField::new('enabled');
it works good, the asset filefield-boolean.js
loaded as wellSF verion 6.4
EA version 4.1
The text was updated successfully, but these errors were encountered: