rc-select
Advanced tools
Comparing version 14.0.4 to 14.0.5
@@ -18,2 +18,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import SelectContext from './SelectContext'; | ||
function isTitleType(content) { | ||
return typeof content === 'string' || typeof content === 'number'; | ||
} | ||
/** | ||
@@ -24,2 +28,3 @@ * Using virtual list of option display. | ||
var OptionList = function OptionList(_, ref) { | ||
@@ -300,4 +305,8 @@ var _useBaseProps = useBaseProps(), | ||
if (group) { | ||
var _data$title; | ||
var groupTitle = (_data$title = data.title) !== null && _data$title !== void 0 ? _data$title : isTitleType(label) && label; | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group")) | ||
className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group")), | ||
title: groupTitle | ||
}, label !== undefined ? label : key); | ||
@@ -323,3 +332,3 @@ } | ||
var optionTitle = typeof content === 'string' || typeof content === 'number' ? content.toString() : undefined; | ||
var optionTitle = isTitleType(content) ? content.toString() : undefined; | ||
@@ -326,0 +335,0 @@ if (title !== undefined) { |
@@ -44,2 +44,5 @@ "use strict"; | ||
function isTitleType(content) { | ||
return typeof content === 'string' || typeof content === 'number'; | ||
} | ||
/** | ||
@@ -49,2 +52,4 @@ * Using virtual list of option display. | ||
*/ | ||
var OptionList = function OptionList(_, ref) { | ||
@@ -325,4 +330,8 @@ var _useBaseProps = (0, _useBaseProps2.default)(), | ||
if (group) { | ||
var _data$title; | ||
var groupTitle = (_data$title = data.title) !== null && _data$title !== void 0 ? _data$title : isTitleType(label) && label; | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: (0, _classnames.default)(itemPrefixCls, "".concat(itemPrefixCls, "-group")) | ||
className: (0, _classnames.default)(itemPrefixCls, "".concat(itemPrefixCls, "-group")), | ||
title: groupTitle | ||
}, label !== undefined ? label : key); | ||
@@ -347,3 +356,3 @@ } | ||
var optionTitle = typeof content === 'string' || typeof content === 'number' ? content.toString() : undefined; | ||
var optionTitle = isTitleType(content) ? content.toString() : undefined; | ||
@@ -350,0 +359,0 @@ if (title !== undefined) { |
{ | ||
"name": "rc-select", | ||
"version": "14.0.4", | ||
"version": "14.0.5", | ||
"description": "React Select", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
285979
6229