Skip to content

Commit

Permalink
fix(Dropdown): handle text as a content in renderLabel (#4047)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored Sep 8, 2020
1 parent c3640e4 commit 859146f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ const getKeyAndValues = (options) =>
function renderItemContent(item) {
const { flag, image, text } = item

// TODO: remove this in v2
// TODO: remove this in v3
// This maintains compatibility with Shorthand API in v1 as this might be called in "Label.create()"
if (React.isValidElement(text) || _.isFunction(text)) {
if (_.isFunction(text)) {
return text
}

Expand Down

0 comments on commit 859146f

Please sign in to comment.