-
-
Notifications
You must be signed in to change notification settings - Fork 390
[CRUD] Allow custom form fields #4968
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
[CRUD] Allow custom form fields #4968
Conversation
Netlify deploy preview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition! Also the improvement with the slots
is important, do we need to additional document it/add a demo for it?
Thanks! I guess I can add a small example, at least with |
Added a demo just with https://deploy-preview-4968--mui-toolpad-docs.netlify.app/toolpad/core/react-crud/#custom-form-fields |
Looks good! For the |
The |
Closes #4837
Adds new
renderFormField
property to data source fields to be able to render anything as a form field. Receive arguments forvalue
,onChange
anderror
to connect with the form logic.Also added slots for every field component type in the form, as well as some overall improvements around all this, such as support for the
valueFormatter
field property in the "Show" pages.https://deploy-preview-4968--mui-toolpad-docs.netlify.app/toolpad/core/react-crud/#custom-form-fields
https://deploy-preview-4968--mui-toolpad-docs.netlify.app/toolpad/core/react-crud/#slots