New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-modal-selector

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-modal-selector - npm Package Compare versions

Comparing version 0.0.21 to 0.0.22

package.json~

23

index.js

@@ -22,2 +22,3 @@ 'use strict';

let componentIndex = 0;
let rnVersion = Number.parseFloat(require('react-native/package.json').version);

@@ -87,2 +88,3 @@ const propTypes = {

selected: 'please select',
changedItem: undefined,
};

@@ -103,5 +105,5 @@ }

onChange(item) {
this.props.onChange(item);
this.setState({selected: item.label});
this.close();
rnVersion < 0.50 && this.props.onChange(item);
this.setState({selected: item.label, changedItem: item });
this.close()
}

@@ -118,2 +120,3 @@

modalVisible: true,
changedItem: undefined,
});

@@ -130,6 +133,7 @@ }

renderOption(option) {
renderOption(option, isLastItem) {
return (
<TouchableOpacity key={option.key} onPress={() => this.onChange(option)}>
<View style={[styles.optionStyle, this.props.optionStyle]}>
<View style={[styles.optionStyle, this.props.optionStyle, isLastItem &&
{borderBottomWidth: 0}]}>
<Text style={[styles.optionTextStyle,this.props.optionTextStyle]}>{option.label}</Text>

@@ -141,10 +145,10 @@ </View>

renderOptionList() {
let options = this.props.data.map(item => {
let options = this.props.data.map((item, index) => {
if (item.section) {
return this.renderSection(item);
}
return this.renderOption(item);
return this.renderOption(item, index === this.props.data.length - 1);
});
const closeOverlay = this.props.backdropPressToClose;

@@ -195,2 +199,3 @@

animationType={this.props.animationType}
onDismiss={() => this.state.changedItem && this.props.onChange(this.state.changedItem)}
>

@@ -197,0 +202,0 @@ {this.renderOptionList()}

{
"name": "react-native-modal-selector",
"version": "0.0.21",
"version": "0.0.22",
"description": "A cross-platform (iOS / Android), selector/picker component for React Native that is highly customizable and supports sections.",

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

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