[Grid] Deprecation package says justifyContent=flex-start is invalid
See original GitHub issue- The issue is present in the latest (deprecation) release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
When setting justifyContent
to flex-start
, an error displays in the console stating the following:
Warning: Failed prop type: Invalid prop
justifyContent
of valueflex-start
supplied toForwardRef(Grid)
, expected one of [“center”,“flex-end”,“space-between”,“space-around”,“space-evenly”].
I see no indication that it should be disallowed, not to mention this value is within the migrated code.
Expected Behavior 🤔
Well…no error, to put it simply.
Steps to Reproduce 🕹
https://codesandbox.io/s/material-ui-deprecations-grid-issue-f9epl?file=/src/Demo.js
Your Environment 🌎
`npx @material-ui/envinfo`
System: OS: macOS 11.2 Binaries: Node: 15.6.0 - ~/.nvm/versions/node/v15.6.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.4.0 - ~/.nvm/versions/node/v15.6.0/bin/npm Browsers: Chrome: 88.0.4324.96 <= Using Edge: Not Found Firefox: 85.0 Safari: 14.0.3 npmPackages: @material-ui/core: 4.11.3 => 4.11.3-deprecations.1 @material-ui/styles: 4.11.3-deprecations.1 @material-ui/system: 4.11.3-deprecations.1 @material-ui/types: 5.1.0 @material-ui/utils: 4.11.2 @types/react: 17.0.0 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
[Grid] Deprecation package says justifyContent=flex-start is ...
When setting justifyContent to flex-start , an error displays in the console stating the following: Warning: Failed prop type: Invalid prop ...
Read more >Failed prop type: The prop `justify` of `ForwardRef(Grid)` is ...
Note that The prop justify is deprecated, use justifyContent instead. So, replace justify by justifyContent. Before : <Grid container ...
Read more >justify-self - CSS: Cascading Style Sheets - MDN Web Docs
The CSS justify-self property sets the way a box is justified inside its alignment ... Pack item from the end */ justify-self: flex-start; ......
Read more >A Complete Guide to Flexbox | CSS-Tricks
Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible ...
Read more >Modern CSS in Angular: Layouts
Modern CSS layouts. The two most recommended modern CSS layout solutions are CSS Flexbox and CSS Grid. CSS Flexbox. Flexbox is a one-dimensional...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi there - I’m not sure if this is the same issue, but I think it is: I’m also getting an error when I attempt to use justifyContent on an MUI Grid container at all… I don’t have this issue when I use JSX alone with MUI, but my current position requires I use Typescript. I’m getting the following error:
Things are fine when I use, say,
style={{justifyContent: 'center'}}
or something to that effect instead, but using the justifyContent prop itself isn’t working.Bug fixed in #24788.