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] rightIconButton: style bug with custom IconMenu component #3959
Comments
I just experienced this same strange behavior. After digging into it, it would seem that the (Note that I just started using React and I don't know if this is intentional or not, but an error message when |
Are you passing down My custom Avatar component looks like this: ...
const Avatar = (props) => {
const propsWithoutMember = { ...props };
delete propsWithoutMember.member;
return (
<MUIAvatar {...propsWithoutMember}>{getInitials(props.member)}</MUIAvatar>
);
};
... I had to remove my custom proptypes before passing it down, otherwise MUI would complain about unknown props. |
Yeah this was a just-starting-out-with-React mistake, only needed to pass |
We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it. |
Hello,
First of all, thanks for you awesome work on this library ;)
I have several position bugs when using custom components Here is an example with a custom IconMenu used in a ListItem.rightIconButton:
The IconMenu works well, but the position of the icon menu is not good (see attached screenshot).
Actually, I think the issue is that style (position: absolute, right: 4, top: 12) is applied to my custom component tag (< CustomComponentListMenu> ) and NOT the IconMenu tag (< IconMenu>).
See ListItem.js:622 (https://github.com/callemall/material-ui/blob/master/src/List/ListItem.js#L622) where rightIconButtonElement is my custom element and not the iconMenu.
I understand it's not really a bug, but it's a serious limitation when using custom component (that's the whole point of React, isn't it ?).
Note that this "bug" also appears with other components, like Avatar in ListItem.leftAvatar.
Screenshot:
Do you think we can find a solution to allow custom component ?
Versions
Material-UI: 0.15.0
React: 14.7
Browser: Chrome, Firefox
The text was updated successfully, but these errors were encountered: