Skip to content
Snippets Groups Projects
Unverified Commit f890cec8 authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Use option icon in case it exists for selected items (#21152)

parent 50ba9b32
Branches
Tags
No related merge requests found
......@@ -148,27 +148,29 @@ export default class Select extends Component {
};
renderItemIcon = item => {
if (this.itemIsSelected(item)) {
const icon = this.props.optionIconFn(item);
if (icon) {
return (
<Icon
name="check"
size={14}
color={color("text-dark")}
name={icon}
size={item.iconSize || 18}
color={item.iconColor || color("text-dark")}
style={{ minWidth: MIN_ICON_WIDTH }}
/>
);
}
const icon = this.props.optionIconFn(item);
if (icon) {
if (this.itemIsSelected(item)) {
return (
<Icon
name={icon}
size={item.iconSize || 18}
color={item.iconColor || color("text-dark")}
name="check"
size={14}
color={color("text-dark")}
style={{ minWidth: MIN_ICON_WIDTH }}
/>
);
}
return <span style={{ minWidth: MIN_ICON_WIDTH }} />;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment