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

react-native-modal-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.0.0 to 1.0.1

17

components/ModalDropdown.js

@@ -30,5 +30,6 @@ import React, { Component } from 'react';

scrollEnabled: PropTypes.bool,
saveScrollPosition: PropTypes.bool,
defaultIndex: PropTypes.number,
defaultValue: PropTypes.string,
options: PropTypes.array.isRequired,
options: PropTypes.array,
accessible: PropTypes.bool,

@@ -93,2 +94,3 @@ animated: PropTypes.bool,

onSelect: PropTypes.func,
numberOfLines: PropTypes.number
};

@@ -100,2 +102,3 @@

scrollEnabled: true,
saveScrollPosition: true,
defaultIndex: -1,

@@ -109,3 +112,4 @@ defaultValue: 'Please select...',

renderButtonComponent: TouchableOpacity,
renderRightComponent: View
renderRightComponent: View,
numberOfLines: 1
};

@@ -221,3 +225,4 @@

renderButtonProps,
renderRightComponent
renderRightComponent,
numberOfLines
} = this.props;

@@ -238,3 +243,3 @@ const ButtonTouchable = renderButtonComponent;

<View style={styles.button}>
<Text style={[styles.buttonText, buttonTextStyle]} numberOfLines={1}>
<Text style={[styles.buttonText, buttonTextStyle]} numberOfLines={numberOfLines}>
{buttonText}

@@ -357,2 +362,3 @@ </Text>

scrollEnabled,
saveScrollPosition,
renderSeparator,

@@ -364,2 +370,3 @@ showsVerticalScrollIndicator,

} = this.props;
const { selectedIndex } = this.state;

@@ -371,2 +378,3 @@ return (

scrollEnabled={scrollEnabled}
initialScrollIndex={saveScrollPosition ? selectedIndex : -1}
style={styles.list}

@@ -408,2 +416,3 @@ keyExtractor={(item, i) => (`key-${i}`)}

]}
testID={item}
{...dropdownTextProps}

@@ -410,0 +419,0 @@ >

@@ -30,2 +30,3 @@ import React, { Component } from 'react';

scrollEnabled: PropTypes.bool,
saveScrollPosition: PropTypes.bool,
defaultIndex: PropTypes.number,

@@ -86,2 +87,3 @@ defaultValue: PropTypes.string,

scrollEnabled: true,
saveScrollPosition: true,
defaultIndex: -1,

@@ -331,2 +333,3 @@ defaultValue: 'Please select...',

scrollEnabled,
saveScrollPosition,
renderSeparator,

@@ -338,2 +341,4 @@ showsVerticalScrollIndicator,

const { selectedIndex } = this.state;
return (

@@ -343,2 +348,3 @@ <FlatList

scrollEnabled={scrollEnabled}
initialScrollIndex={saveScrollPosition ? selectedIndex : -1}
style={styles.list}

@@ -345,0 +351,0 @@ keyExtractor={(item, i) => (`key-${i}`)}

{
"name": "react-native-modal-dropdown",
"version": "1.0.0",
"version": "1.0.1",
"description": "A react-native dropdown component for both iOS and Android.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -24,2 +24,5 @@ [![npm version](https://badge.fury.io/js/react-native-modal-dropdown.svg)](https://badge.fury.io/js/react-native-modal-dropdown)

### v1.0.1
- small fixes and more styling custimizations allowed
### v1.0.0

@@ -35,7 +38,7 @@ - took over the package and merged user's PRs

```sh
npm i https://github.com/siemiatj/react-native-modal-dropdown -save
npm i --save react-native-modal-dropdown
```
or
```sh
yarn add https://github.com/siemiatj/react-native-modal-dropdown
yarn add react-native-modal-dropdown
```

@@ -79,2 +82,3 @@

`showsVerticalScrollIndicator` | bool | Yes | true | Show / hide vertical scroll indicator.
`saveScrollPosition` | bool | Yes | true | Sets the scroll position to selected index.
`style` | object | Yes | | Style of the button.

@@ -81,0 +85,0 @@ `textStyle` | object | Yes | | Style of the button text. **Invalid in wrapper mode.**

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