feat: support @mui/x-date-pickers v7 #2349
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2328
This PR updates the
peerDependencies
of@jsonforms/material-renderers
to allow for either v6 or v7 of@mui/x-date-pickers
. I went through the v6 to v7 migration guide and didn't see any breaking changes that require a code change in@jsonforms/material-renderers
. I also tried running the pickers codemod to see if it changes anything, but it didn't. I also checked the material-renderers Dates examples and confirmed they still work.There is mention of updating
@mui/material
, but the examples seem to work without it. I was trying to better understand why the need for the update (mui/mui-x#12516) and it seemed like it was for a very specific use case (mui/mui-x#12248) that I don't think requires a corresponding peer dependency bump in@jsonforms/material-renderers
, but happy to do so if you prefer.In other words, think the material-renderers (as it's currently implemented) can support both
@mui/x-date-pickers
6 and 7, but this would also mean that any future changes made in the control components would need to be tested against both versions, at least until the next major release of jsonforms where v6 support could be dropped.