-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[ListItem] Warning about non-boolean attribute 'button' #22941
Comments
Assign this to me |
It doesn't look like this bug report has enough info for one of us to reproduce it. Please provide a CodeSandbox (https://material-ui.com/r/issue-template), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve |
This looks like it's linked with an issue I have in a TS environment;
Reproduction : https://codesandbox.io/s/material-ui-issue-forked-w5cew?file=/src/Demo.tsx |
After looking more into it, this seems related to #14971 , since the propTypes are generated from the TS types |
Duplicate of #14971 |
I was also getting this warning but then I just changed the props from button={true} to button="true", and then there is no warning from DOM. |
Current Behavior 😯
Getting following warning about "button" prop on ListItem component:
Warning: Received
true
for a non-boolean attributebutton
.Expected Behavior 🤔
The prop "button" should be allowed without warning
Steps to Reproduce 🕹
Render the "ListItem" component with the "button" prop declared:
<ListItem button />
or
<ListItem button={true} />
Your Environment 🌎
The text was updated successfully, but these errors were encountered: