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

react-native-dropdown-picker

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-dropdown-picker - npm Package Compare versions

Comparing version 3.6.1 to 3.6.2

2

package.json
{
"name": "react-native-dropdown-picker",
"version": "3.6.1",
"version": "3.6.2",
"description": "A single or multiple, searchable item picker (dropdown) component for react native which supports both Android & iOS.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -188,16 +188,6 @@

// Single
this.controller.select({
label: 'UK',
value: 'uk',
icon: () => {},
});
this.controller.selectItem('uk');
// Multiple
this.controller.select([
{
label: 'UK',
value: 'uk',
icon: () => {},
}
]);
this.controller.selectItem(['uk', 'france']);
```

@@ -204,0 +194,0 @@ 3. Add items manually.

@@ -173,3 +173,5 @@ import React from 'react';

} else {
this.select(items.find(item => item.value === defaultValue));
this.select(
items.find(item => item.value === defaultValue)
);
}

@@ -238,2 +240,20 @@ } else {

selectItem(defaultValue) {
if (this.state.props.multiple) {
(async () => {
for (const value of defaultValue) {
await new Promise((resolve, reject) => {
resolve(
this.select(items.find(item => item.value === value))
);
});
}
})();
} else {
this.select(
this.state.props.items.find(item => item.value === defaultValue)
);
}
}
select(item) {

@@ -240,0 +260,0 @@ const { multiple } = this.state.props;

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