rc-select
Advanced tools
Comparing version 14.7.2 to 14.7.3
@@ -25,3 +25,2 @@ import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import { useAllowClear } from "./hooks/useAllowClear"; | ||
import { warning } from 'rc-util'; | ||
var DEFAULT_OMIT_PROPS = ['value', 'onChange', 'removeIcon', 'placeholder', 'autoFocus', 'maxTagCount', 'maxTagTextLength', 'maxTagPlaceholder', 'choiceTransitionName', 'onInputKeyDown', 'onPopupScroll', 'tabIndex']; | ||
@@ -481,5 +480,2 @@ export function isMultiple(mode) { | ||
// ============================= Clear ============================== | ||
if (process.env.NODE_ENV !== 'production') { | ||
warning(!props.clearIcon, '`clearIcon` will be removed in future. Please use `allowClear` instead.'); | ||
} | ||
var onClearMouseDown = function onClearMouseDown() { | ||
@@ -486,0 +482,0 @@ var _selectorRef$current4; |
@@ -278,6 +278,11 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
} | ||
// ignore when search value equal select input value | ||
if (filteredOptions.some(function (item) { | ||
return item[mergedFieldNames.value] === mergedSearchValue; | ||
})) { | ||
return filteredOptions; | ||
} | ||
// Fill search value as option | ||
return [createTagOption(mergedSearchValue)].concat(_toConsumableArray(filteredOptions)); | ||
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue]); | ||
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]); | ||
var orderedFilteredOptions = React.useMemo(function () { | ||
@@ -284,0 +289,0 @@ if (!filterSort) { |
@@ -33,3 +33,2 @@ "use strict"; | ||
var _useAllowClear2 = require("./hooks/useAllowClear"); | ||
var _rcUtil = require("rc-util"); | ||
var _excluded = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"]; | ||
@@ -492,5 +491,2 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
// ============================= Clear ============================== | ||
if (process.env.NODE_ENV !== 'production') { | ||
(0, _rcUtil.warning)(!props.clearIcon, '`clearIcon` will be removed in future. Please use `allowClear` instead.'); | ||
} | ||
var onClearMouseDown = function onClearMouseDown() { | ||
@@ -497,0 +493,0 @@ var _selectorRef$current4; |
@@ -287,6 +287,11 @@ "use strict"; | ||
} | ||
// ignore when search value equal select input value | ||
if (filteredOptions.some(function (item) { | ||
return item[mergedFieldNames.value] === mergedSearchValue; | ||
})) { | ||
return filteredOptions; | ||
} | ||
// Fill search value as option | ||
return [createTagOption(mergedSearchValue)].concat((0, _toConsumableArray2.default)(filteredOptions)); | ||
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue]); | ||
}, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]); | ||
var orderedFilteredOptions = React.useMemo(function () { | ||
@@ -293,0 +298,0 @@ if (!filterSort) { |
{ | ||
"name": "rc-select", | ||
"version": "14.7.2", | ||
"version": "14.7.3", | ||
"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
330545
7029
12