-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
type: bugIt doesn't behave as expected.It doesn't behave as expected.
Description
https://github.com/callemall/material-ui/blob/master/src/menus/menu-item.jsx#L168-L172
if (rightIcon) {
const mergedRightIconStyles = desktop ?
this.mergeStyles(styles.rightIconDesktop, rightIcon.props.style) : null;
rightIconElement = React.cloneElement(rightIcon, {style: mergedRightIconStyles});
}
In MenuItem when merging styles.rightIconDesktop with rightIcon.props.style, the merge only happens if desktop == true, otherwise it sets it to null. If desktop == false it should at least preserve the style property the developer provided for the rightIcon.
if (rightIcon) {
const mergedRightIconStyles = desktop ?
this.mergeStyles(styles.rightIconDesktop, rightIcon.props.style) : rightIcon.props.style;
rightIconElement = React.cloneElement(rightIcon, {style: mergedRightIconStyles});
}
Metadata
Metadata
Assignees
Labels
type: bugIt doesn't behave as expected.It doesn't behave as expected.