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
469
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.1.1 to 14.1.2

2

es/hooks/useOptions.d.ts

@@ -7,3 +7,3 @@ import * as React from 'react';

*/
export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames): {
export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames, optionFilterProp: string, optionLabelProp: string): {
options: OptionType[];

@@ -10,0 +10,0 @@ valueOptions: Map<RawValueType, OptionType>;

@@ -8,3 +8,3 @@ import * as React from 'react';

export default function useOptions(options, children, fieldNames) {
export default function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
return React.useMemo(function () {

@@ -21,2 +21,8 @@ var mergedOptions = options;

var setLabelOptions = function setLabelOptions(labelOptionsMap, option, key) {
if (key && typeof key === 'string') {
labelOptionsMap.set(option[key], option);
}
};
function dig(optionList) {

@@ -31,3 +37,6 @@ var isChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

valueOptions.set(option[fieldNames.value], option);
labelOptions.set(option[fieldNames.label], option);
setLabelOptions(labelOptions, option, fieldNames.label); // https://github.com/ant-design/ant-design/issues/35304
setLabelOptions(labelOptions, option, optionFilterProp);
setLabelOptions(labelOptions, option, optionLabelProp);
} else {

@@ -45,3 +54,3 @@ dig(option[fieldNames.options], true);

};
}, [options, children, fieldNames]);
}, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
}

@@ -126,3 +126,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

var parsedOptions = useOptions(options, children, mergedFieldNames);
var parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
var valueOptions = parsedOptions.valueOptions,

@@ -129,0 +129,0 @@ labelOptions = parsedOptions.labelOptions,

@@ -7,3 +7,3 @@ import * as React from 'react';

*/
export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames): {
export default function useOptions<OptionType>(options: OptionType[], children: React.ReactNode, fieldNames: FieldNames, optionFilterProp: string, optionLabelProp: string): {
options: OptionType[];

@@ -10,0 +10,0 @@ valueOptions: Map<RawValueType, OptionType>;

@@ -18,3 +18,3 @@ "use strict";

*/
function useOptions(options, children, fieldNames) {
function useOptions(options, children, fieldNames, optionFilterProp, optionLabelProp) {
return React.useMemo(function () {

@@ -31,2 +31,8 @@ var mergedOptions = options;

var setLabelOptions = function setLabelOptions(labelOptionsMap, option, key) {
if (key && typeof key === 'string') {
labelOptionsMap.set(option[key], option);
}
};
function dig(optionList) {

@@ -41,3 +47,6 @@ var isChildren = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

valueOptions.set(option[fieldNames.value], option);
labelOptions.set(option[fieldNames.label], option);
setLabelOptions(labelOptions, option, fieldNames.label); // https://github.com/ant-design/ant-design/issues/35304
setLabelOptions(labelOptions, option, optionFilterProp);
setLabelOptions(labelOptions, option, optionLabelProp);
} else {

@@ -55,3 +64,3 @@ dig(option[fieldNames.options], true);

};
}, [options, children, fieldNames]);
}, [options, children, fieldNames, optionFilterProp, optionLabelProp]);
}

@@ -128,3 +128,3 @@ "use strict";

var parsedOptions = (0, _useOptions.default)(options, children, mergedFieldNames);
var parsedOptions = (0, _useOptions.default)(options, children, mergedFieldNames, optionFilterProp, optionLabelProp);
var valueOptions = parsedOptions.valueOptions,

@@ -131,0 +131,0 @@ labelOptions = parsedOptions.labelOptions,

{
"name": "rc-select",
"version": "14.1.1",
"version": "14.1.2",
"description": "React Select",

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

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