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

react-native-arm-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.2 to 0.0.3

4

index.js

@@ -1,2 +0,2 @@

import DropDown from './src/'
module.exports = DropDown
import DropDown from './src/index';
module.exports = DropDown;
{
"name": "react-native-arm-dropdown",
"version": "0.0.2",
"version": "0.0.3",
"description": "DropDown for React-Native",

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

@@ -13,7 +13,8 @@ ## React-Native-Arm-DropDown

| Props | Value |
| ---------------- | ---------------|
| title | String |
| id | Number |
| items | Array |
| Props | Types |
| ---------------- | ----------------|
| title | String |
| id | Number |
| items | Array |
| titleStyle | Object or Array |

@@ -20,0 +21,0 @@ #### Example

@@ -8,3 +8,4 @@ import React, { Component } from 'react';

start: 500,
end: 100
end: 100,
state: true
};

@@ -33,9 +34,10 @@

let { heightItem, heightAnimationDrop } = this.state;
if(conf.state){
this.setState({
title: props.title || '',
items: props.items || [],
openItems: props.openItems || true
});
}
this.setState({
title: props.title || '',
items: props.items || [],
openItems: props.openItems || true
});
if(!props.openItems){

@@ -51,10 +53,22 @@ setTimeout(()=>{

).start(()=>{
this.setState({open: false, droped: false});
if(conf.state){
this.setState({open: false, droped: false});
}
});
}, conf.start);
}else{
this.setState({openItems: props.openItems});
if(conf.state){
this.setState({openItems: props.openItems});
}
}
};
UNSAFE_componentWillMount = () => {
conf.state = true;
};
componentWillUnmount = () => {
conf.state = false;
};
startAnimation = () => {

@@ -72,3 +86,5 @@ let { droped, heightItem, heightAnimationDrop, items } = this.state;

).start(()=>{
this.setState({openItems: false});
if(conf.state){
this.setState({openItems: false});
}
});

@@ -85,7 +101,10 @@ }else{

).start(()=>{
this.setState({open: true, openItems: true});
if(conf.state){
this.setState({open: true, openItems: true});
}
});
}
this.setState({droped: !droped});
if(conf.state){
this.setState({droped: !droped});
}
};

@@ -104,3 +123,5 @@

let { heightAnimationDrop } = this.state;
this.setState({open: false});
if(conf.state){
this.setState({open: false});
}
Animated.timing(

@@ -114,5 +135,9 @@ heightAnimationDrop,

).start(()=>{
this.setState({openItems: false});
if(conf.state){
this.setState({openItems: false});
}
});
this.setState({heightItem: height});
if(conf.state){
this.setState({heightItem: height});
}
};

@@ -122,3 +147,3 @@

let { items, title, heightAnimationDrop, droped, open, openItems } = this.state;
let { id, onChange } = this.props;
let { id, onChange, titleStyle } = this.props;

@@ -139,3 +164,3 @@ return(

droped={droped}
text={[styles.fontWeightBold]}
text={[styles.fontWeightBold, titleStyle]}
onChange={(idItem, drop)=>{

@@ -161,2 +186,3 @@ this.onChangeItem(idItem, drop);

open={open}
titleStyle={titleStyle}
items={item.items}

@@ -163,0 +189,0 @@ onChange={(idItem, title)=>{

@@ -15,2 +15,3 @@ import React from 'react';

openItems={props.openItems}
titleStyle={props.titleStyle}
onChange={(id, title)=>{

@@ -17,0 +18,0 @@ props.onChange(id, title);

Sorry, the diff of this file is not supported yet

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