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

react-select-search

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-search - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

src/index.d.ts

9

dist/cjs/useSelect.js

@@ -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);

15

package.json
{
"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",

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