question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ListItemAvatar] Getting a warning about `childrenClassName`

See original GitHub issue

image

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

Current Behavior 😯

Steps to Reproduce 🕹

Passed an to the ListItemAvatar component The browser will give us a warning like Warning: React does not recognize the childrenClassName prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase childrenclassname instead. If you accidentally passed it from a parent component, remove it from the DOM element.

Context 🔦

Your Environment 🌎

Tech Version
Material-UI ^3.6.2
React ^16.4.1
Browser Chrome
TypeScript ^3.2.2
etc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eps1loncommented, Jan 14, 2019

The original issue sounds like you’re using

<ListItemAvatar><img /></ListItemAvatar>

instead of the documented

<ListItemAvatar><Avatar /></ListItemAvatar>

For future reference please follow the issue template and include some form of code with which we can understand what you’re doing and ideally reproduce the issue.

0reactions
pak11273commented, Jun 5, 2019

@georgeneil Did you find a solution to this problem? I’m getting this error with a Badge Component wrapping a ListItemAvatar component. If you inline style the Badge it will apply the styles to the ListItemAvatar component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[ListItemAvatar] Getting a warning about `childrenClassName`
It feels like there is some code in Material that isn't properly changing value types from what Material wants to what React wants......
Read more >
ListItemAvatar API - Material UI - MUI
API reference docs for the React ListItemAvatar component. Learn about the props, CSS, and other APIs of this exported module.
Read more >
JavaScript @babel/runtime/helpers/objectSpread Examples
"production" ? warning(false, `Material-UI: <ListItemAvatar> is a simple wrapper to apply the dense styles to <Avatar>. You do not need it unless you...
Read more >
https://auctions.truckandtrailer.co.za/res/dist/at...
n *\n * Notice that the dialog width grow is limited by the default margin. ... Utils\n * @param {Object} position - CSS...
Read more >
Package Diff: @material-ui/core @ 3.5.1 .. 3.9.3
Fix Snackbar getting stuck when receiving new props (#2024) ... "production" ? warning(false, `Material-UI: <ListItemAvatar> is a simple wrapper to apply ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found