-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Update @rjsf/material-ui import instructions on Read the Docs #2858
Comments
Thanks @kjkent , mind making a PR to update those docs? |
@epicfaace happily :) I'll do so this evening. |
@epicfaace, I haven't forgot about this, my apologies for the delay, work has been intense -- I'll make that PR shortly (within the next couple of days) |
Hi. I am trying to implement MUI. I went through the ReadMe as well and some issues around the same thing. But I still get the error. what am I missing, can someone help? |
@rjsf/material-ui is not installed correctly. Your package.json should look like the following: {
// ...
"dependencies": {
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@mui/icons-material": "^5.8.3",
"@mui/material": "^5.8.3",
"@rjsf/bootstrap-4": "^4.2.0", // also, if you're using Mui I think you don't need the bootstrap version
"@rjsf/core": "^4.2.0",
"@rjsf/material-ui": "^4.2.0", // added the package here
"react": "^17.0.0",
"react-dom": "^17.0.0"
}
// ...
} See README.md |
Hi @ivanlewin, I installed everything acc. to what you mentioned even then I get the error. |
@Anushka-shukla Try this: |
|
I actually get these errors when using the package. I have an app with mui v4 and I get messages saying that mui v5 imports couldn't be resolved. I am waiting for an answer as well |
okay.. |
This is not the preferred way of doing this as it will cause the issues mentioned. |
What would be the best way to import MuiForm4 ? Update: I got my ts compiler to not complain any more; My file tree is something like this:
My
Now I can import v4 Form correctly in import Form from "@rjsf/material-ui/v4"; Hope this helps @Anushka-shukla |
Fixed in v5 beta by separating out material-ui 5 into a new |
Hey @epicfaace @heath-freenome, I want to sincerely apologise for committing to contribute to the docs here and then completely disappearing -- work's been incredibly busy and I found myself having bitten off more than I could chew! Sorry again, and congrats on the constant improvements and work on |
Prerequisites
What theme are you using?
material-ui
Version
4.2.0
Current Behavior
The documentation instructs users to import
@rjsf/material-ui
withimport Form from @rjsf/material-ui
. This leads to errors such as what I encountered here and similar to what is reported in #2762 before the introduction of the v4/v5 subpackages.Expected Behavior
@heath-freenome kindly pointed me in the direction of the direction of the README.md for @rjsf/material-ui, which contains the updated and correct import instructions.
Steps To Reproduce
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: