From c4c62b0a144756602cb4e5f720f4fde043a0dd53 Mon Sep 17 00:00:00 2001 From: Oleksandr Fediashov Date: Wed, 26 Aug 2020 11:28:09 +0200 Subject: [PATCH] fix(Dropdown): handle `text` as a content in `renderLabel` --- src/modules/Dropdown/Dropdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/Dropdown/Dropdown.js b/src/modules/Dropdown/Dropdown.js index ed3353aa96..783cffebf1 100644 --- a/src/modules/Dropdown/Dropdown.js +++ b/src/modules/Dropdown/Dropdown.js @@ -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 }