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

react-native-picker-actionsheet

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.1.5 to 1.1.6

4

package.json
{
"name": "react-native-picker-actionsheet",
"version": "1.1.5",
"version": "1.1.6",
"description": "A picker like ActionSheet component which can be used in iOS & Android . Use Animated . ",

@@ -30,2 +30,2 @@ "main": "src/index.js",

}
}
}

@@ -32,2 +32,3 @@ # react-native-picker-actionsheet [![Monthly download](https://img.shields.io/npm/dm/react-native-picker-actionsheet.svg)](https://img.shields.io/npm/dm/react-native-picker-actionsheet.svg) [![Total downloads](https://img.shields.io/npm/dt/react-native-picker-actionsheet.svg)](https://img.shields.io/npm/dt/react-native-picker-actionsheet.svg)

| renderItem | ({item,index})=>{} | no | Function that shows data |
| renderFooter | ()=>{} | no | Function that shows footer |
| onCancel | ()=>{} | no | Function that is called when user cancels it |

@@ -37,1 +38,2 @@ | onSubmit | (text)=>{} | no | Function that is called when user submits it |

| submitText | 'submit' | no | The string that is displayed on the submit button |
| shadowClick | 'submit' | no | The string that is 'cancel' or 'submit' when shadow is clicked |
import React from 'react';
import {StyleSheet,Animated,Modal,View,ScrollView,Text,TouchableWithoutFeedback,Dimensions} from 'react-native';
export default class extends React.Component{
export default class extends React.PureComponent{
static defaultProps={

@@ -16,3 +16,4 @@ show:false,

onCancel:()=>{},
shadowClick:'submit'
shadowClick:'submit',
renderFooter:null
};

@@ -22,6 +23,6 @@ constructor(props){

this.state={maskerOpacity:new Animated.Value(this.props.show?.5:0),bottomPosition:new Animated.Value(this.props.show?1:0),show:!this.props.show};
this.showF=()=>this.setState({show:this.props.show});
this.cancelF=()=>this.props.onCancel();
this.shadowF=()=>this.props.shadowClick==='submit'?this.props.onSubmit():this.props.onCancel();
this.submitF=()=>this.props.onSubmit();
this.showF=()=>this.setState({show:this.props.show});
this.cancelF=()=>this.props.onCancel();
this.shadowF=()=>this.props.shadowClick==='submit'?this.props.onSubmit():this.props.onCancel();
this.submitF=()=>this.props.onSubmit();
}

@@ -33,3 +34,3 @@ render(){

if(this.state.show!==this.props.show)
Animated.parallel([
requestAnimationFrame(()=>Animated.parallel([
Animated.timing(

@@ -49,3 +50,3 @@ this.state.maskerOpacity,

)
]).start(this.showF);
]).start(this.showF));
return(

@@ -80,2 +81,3 @@ this.state.show||this.props.show?<Modal transparent={true} onRequestClose={this.cancelF}>

</View>:this.props.ListEmptyComponent}
{this.props.renderFooter&&this.props.renderFooter()}
</Animated.View>

@@ -96,3 +98,3 @@ </Modal>:null

width:'100%',
backgroundColor:'#fff'
backgroundColor:'#f9f9f9'
},

@@ -127,9 +129,7 @@ item_top:{

alignItems:'center',
flexWrap:'wrap',
backgroundColor:'#f9f9f9'
flexWrap:'wrap'
},
items_scroll:{
paddingVertical:6,
backgroundColor:'#f9f9f9'
paddingVertical:6
}
});
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