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

react-native-picker-select

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 5.1.1 to 5.2.0

6

CHANGELOG.md

@@ -0,1 +1,7 @@

### v5.2.0
##### New
- Added `onOpen` and `onClose` callbacks (iOS only)
### v5.1.1

@@ -2,0 +8,0 @@

2

index.d.ts

@@ -27,2 +27,4 @@ /// <reference types="react" />

onDownArrow?: () => void;
onOpen?: () => void;
onClose?: () => void;
modalProps?: object;

@@ -29,0 +31,0 @@ textInputProps?: object;

2

package.json
{
"name": "react-native-picker-select",
"version": "5.1.1",
"version": "5.2.0",
"description": "A Picker component for React Native which emulates the native <select> interfaces for each platform",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -53,2 +53,3 @@ # react-native-picker-select

| onDonePress | function | Callback when the 'Done' button is pressed | N | iOS |
| onOpen / onClose | function | Callback triggered right before the opening or closing of the picker | N | iOS |
| modalProps | object | Additional props to pass to the Modal (some props are used in core functionality so use this carefully) | N | iOS |

@@ -55,0 +56,0 @@ | textInputProps | object | Additional props to pass to the TextInput (some props are used in core functionality so use this carefully) | N | iOS |

@@ -49,2 +49,4 @@ import React, { PureComponent } from 'react';

onDownArrow: PropTypes.func,
onOpen: PropTypes.func,
onClose: PropTypes.func,

@@ -80,2 +82,4 @@ // Modal props (iOS only)

onDownArrow: null,
onOpen: null,
onClose: null,
modalProps: {},

@@ -205,2 +209,14 @@ textInputProps: {},

triggerOpenCloseCallbacks() {
const { onOpen, onClose } = this.props;
if (!this.state.showPicker && onOpen) {
onOpen();
}
if (this.state.showPicker && onClose) {
onClose();
}
}
togglePicker(animate = false) {

@@ -216,2 +232,4 @@ const { modalProps, disabled } = this.props;

this.triggerOpenCloseCallbacks();
this.setState({

@@ -218,0 +236,0 @@ animationType: animate ? animationType : undefined,

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