Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-select

Package Overview
Dependencies
Maintainers
9
Versions
468
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-select - npm Package Compare versions

Comparing version 14.16.0 to 14.16.1

17

es/OptionList.js

@@ -122,5 +122,16 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

var isSelected = React.useCallback(function (value) {
return rawValues.has(value) && mode !== 'combobox';
if (mode === 'combobox') {
return false;
}
return rawValues.has(value);
}, [mode, _toConsumableArray(rawValues).toString(), rawValues.size]);
// https://github.com/ant-design/ant-design/issues/48036
var isAriaSelected = React.useCallback(function (value) {
if (mode === 'combobox') {
return String(value).toLowerCase() === searchValue.toLowerCase();
}
return rawValues.has(value);
}, [mode, searchValue, _toConsumableArray(rawValues).toString(), rawValues.size]);
// Auto scroll to item position in single mode

@@ -275,3 +286,3 @@ useEffect(function () {

}, getItemAriaProps(item, index), {
"aria-selected": isSelected(value)
"aria-selected": isAriaSelected(value)
}), value) : null;

@@ -342,3 +353,3 @@ };

return /*#__PURE__*/React.createElement("div", _extends({}, pickAttrs(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
"aria-selected": selected,
"aria-selected": isAriaSelected(value),
className: optionClassName,

@@ -345,0 +356,0 @@ title: optionTitle,

4

es/Selector/MultipleSelector.js

@@ -180,3 +180,5 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

});
return /*#__PURE__*/React.createElement(React.Fragment, null, selectionNode, !values.length && !inputValue && /*#__PURE__*/React.createElement("span", {
return /*#__PURE__*/React.createElement("span", {
className: "".concat(selectionPrefixCls, "-wrap")
}, selectionNode, !values.length && !inputValue && /*#__PURE__*/React.createElement("span", {
className: "".concat(selectionPrefixCls, "-placeholder")

@@ -183,0 +185,0 @@ }, placeholder));

@@ -64,3 +64,5 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";

}, [item, hasTextInput, placeholder, prefixCls]);
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
return /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-selection-wrap")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-selection-search")

@@ -67,0 +69,0 @@ }, /*#__PURE__*/React.createElement(Input, {

@@ -131,5 +131,16 @@ "use strict";

var isSelected = React.useCallback(function (value) {
return rawValues.has(value) && mode !== 'combobox';
if (mode === 'combobox') {
return false;
}
return rawValues.has(value);
}, [mode, (0, _toConsumableArray2.default)(rawValues).toString(), rawValues.size]);
// https://github.com/ant-design/ant-design/issues/48036
var isAriaSelected = React.useCallback(function (value) {
if (mode === 'combobox') {
return String(value).toLowerCase() === searchValue.toLowerCase();
}
return rawValues.has(value);
}, [mode, searchValue, (0, _toConsumableArray2.default)(rawValues).toString(), rawValues.size]);
// Auto scroll to item position in single mode

@@ -284,3 +295,3 @@ (0, _react.useEffect)(function () {

}, getItemAriaProps(item, index), {
"aria-selected": isSelected(value)
"aria-selected": isAriaSelected(value)
}), value) : null;

@@ -351,3 +362,3 @@ };

return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, (0, _pickAttrs.default)(passedProps), !virtual ? getItemAriaProps(item, itemIndex) : {}, {
"aria-selected": selected,
"aria-selected": isAriaSelected(value),
className: optionClassName,

@@ -354,0 +365,0 @@ title: optionTitle,

@@ -190,3 +190,5 @@ "use strict";

});
return /*#__PURE__*/React.createElement(React.Fragment, null, selectionNode, !values.length && !inputValue && /*#__PURE__*/React.createElement("span", {
return /*#__PURE__*/React.createElement("span", {
className: "".concat(selectionPrefixCls, "-wrap")
}, selectionNode, !values.length && !inputValue && /*#__PURE__*/React.createElement("span", {
className: "".concat(selectionPrefixCls, "-placeholder")

@@ -193,0 +195,0 @@ }, placeholder));

@@ -74,3 +74,5 @@ "use strict";

}, [item, hasTextInput, placeholder, prefixCls]);
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
return /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-selection-wrap")
}, /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-selection-search")

@@ -77,0 +79,0 @@ }, /*#__PURE__*/React.createElement(_Input.default, {

{
"name": "rc-select",
"version": "14.16.0",
"version": "14.16.1",
"description": "React Select",

@@ -5,0 +5,0 @@ "engines": {

@@ -5,3 +5,3 @@ # rc-select

React Select
React Select Component.

@@ -8,0 +8,0 @@ <!-- prettier-ignore -->

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc