react-select-search
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -123,3 +123,10 @@ "use strict"; | ||
setState(function (oldState) { | ||
var item = val || oldState.flat[oldState.highlighted].value; | ||
var defaultItem = oldState.flat[oldState.highlighted]; | ||
var oldStateValue = defaultItem && defaultItem.value; | ||
var item = val || oldStateValue; | ||
if (!item) { | ||
return oldState; | ||
} | ||
var values = (0, _getNewValue["default"])(item, oldState.value, multiple); | ||
@@ -126,0 +133,0 @@ var newOptions = (0, _getOption["default"])(values, oldState.flat); |
@@ -82,3 +82,10 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
setState(oldState => { | ||
const item = val || oldState.flat[oldState.highlighted].value; | ||
const defaultItem = oldState.flat[oldState.highlighted]; | ||
const oldStateValue = defaultItem && defaultItem.value; | ||
const item = val || oldStateValue; | ||
if (!item) { | ||
return oldState; | ||
} | ||
const values = getNewValue(item, oldState.value, multiple); | ||
@@ -85,0 +92,0 @@ const newOptions = getOption(values, oldState.flat); |
{ | ||
"name": "react-select-search", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Lightweight select component for React", | ||
"main": "dist/esm/index.js", | ||
"types": "src/index.d.ts", | ||
"scripts": { | ||
"lint": "eslint src/* --ext .js --ext .jsx", | ||
"lint": "eslint src --ext .js --ext .jsx", | ||
"test": "jest", | ||
@@ -47,7 +48,7 @@ "test:watch": "npm test -- --watch", | ||
"@babel/register": "^7.9.0", | ||
"@storybook/addon-actions": "^5.3.18", | ||
"@storybook/addon-links": "^5.3.18", | ||
"@storybook/addon-storysource": "^5.3.18", | ||
"@storybook/addons": "^5.3.18", | ||
"@storybook/react": "^5.3.18", | ||
"@storybook/addon-actions": "^5.3.19", | ||
"@storybook/addon-links": "^5.3.19", | ||
"@storybook/addon-storysource": "^5.3.19", | ||
"@storybook/addons": "^5.3.19", | ||
"@storybook/react": "^5.3.19", | ||
"babel-eslint": "^10.1.0", | ||
@@ -54,0 +55,0 @@ "babel-loader": "^8.1.0", |
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
85841
34
1686