Skip to content

Commit

Permalink
feat(Dropdown): render selected item rich content
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Mar 10, 2020
1 parent eacfbf4 commit 115cbe6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions packages/react/src/components/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ export default class Dropdown extends React.Component {
return label;
};

// needs to be Capitalized for react to render it correctly
const ItemToElement = itemToElement;
return (
<div className={wrapperClasses}>
{title}
Expand Down Expand Up @@ -312,11 +310,7 @@ export default class Dropdown extends React.Component {
}
title={itemToElement ? item.text : itemToString(item)}
{...itemProps}>
{itemToElement ? (
<ItemToElement key={itemProps.id} {...item} />
) : (
itemToString(item)
)}
<SelectedItem>{selectedItem}</SelectedItem>
{selectedItem === item && (
<Checkmark16
className={`${prefix}--list-box__menu-item__selected-icon`}
Expand Down

0 comments on commit 115cbe6

Please sign in to comment.