-
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
fix: remove mui/material-ui ArrayFieldTemplate grid wrapper #3864
fix: remove mui/material-ui ArrayFieldTemplate grid wrapper #3864
Conversation
7dac32e
to
0a76e68
Compare
registry={registry} | ||
/> | ||
)} | ||
<Grid item={true} xs={12}> |
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.
What about entirely removing the Grid container
on line 63 of ArrayFieldTemplate
instead?
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.
Yes that makes more sense. There's just the question about what to do with the key
prop on that Grid container. I could leave it there and change the Grid
to a Box
or just remove it entirely along with the key
prop. I'm not sure the key
prop is necessary so maybe the latter makes more sense.
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.
Honestly the key
prop is only required/used by React when it is being generated from some sort of map function, which this is not so you can remove it.
registry={registry} | ||
/> | ||
)} | ||
<Grid item={true} xs={12}> |
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.
What about entirely removing the Grid container
on line 63 of ArrayFieldTemplate
instead?
0a76e68
to
948d65a
Compare
948d65a
to
db8be21
Compare
…uble-grid-container
…uble-grid-container
@jroebu14 This looks great! Can you update the |
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
1a31c32
to
a2465c5
Compare
…uble-grid-container
Reasons for making this change
fixes #3863
Removes a wrapping Grid component in
ArrayFieldTemplate
that wrapsArrayFieldItemTemplate
. This is for the MUI and material-ui themes only.Checklist
npm run test:update
to update snapshots, if needed.