react-select-search
Advanced tools
Comparing version 3.0.8 to 3.0.9
@@ -50,3 +50,2 @@ "use strict"; | ||
var ref = (0, _react.useRef)(null); | ||
var valueRef = (0, _react.useRef)(undefined); | ||
@@ -135,7 +134,2 @@ var _useState = (0, _react.useState)(null), | ||
(0, _react.useEffect)(function () { | ||
if (valueRef.current === defaultValue) { | ||
return; | ||
} | ||
valueRef.current = defaultValue; | ||
setValue((0, _getOptions["default"])(defaultValue, null, options, multiple)); | ||
@@ -142,0 +136,0 @@ }, [defaultValue, multiple, options]); |
@@ -25,3 +25,2 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
const ref = useRef(null); | ||
const valueRef = useRef(undefined); | ||
const [value, setValue] = useState(null); | ||
@@ -89,7 +88,2 @@ const [search, setSearch] = useState(''); | ||
useEffect(() => { | ||
if (valueRef.current === defaultValue) { | ||
return; | ||
} | ||
valueRef.current = defaultValue; | ||
setValue(getOptions(defaultValue, null, options, multiple)); | ||
@@ -96,0 +90,0 @@ }, [defaultValue, multiple, options]); |
{ | ||
"name": "react-select-search", | ||
"version": "3.0.8", | ||
"version": "3.0.9", | ||
"description": "Lightweight select component for React", | ||
"main": "dist/esm/index.js", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
@@ -7,0 +7,0 @@ "types": "src/index.d.ts", |
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
79081
1873