Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-native-material-dropdown-v2-fixed
Advanced tools
Material dropdown with consistent behaviour on iOS and Android This fork contain a fix for the dropdown icon
npm install --save react-native-material-dropdown-v2-fixed
import React, { Component } from 'react';
import { Dropdown } from 'react-native-material-dropdown-v2-fixed';
class Example extends Component {
render() {
let data = [{
value: 'Banana',
}, {
value: 'Mango',
}, {
value: 'Pear',
}];
return (
<Dropdown
icon='chevron-down'
iconColor='#E1E1E1'
label='Favorite Fruit'
data={data}
/>
);
}
}
name | description | type | default |
---|---|---|---|
label | Text field label text | String | - |
error | Text field error text | String | - |
icon | Text field right icon | String | chevron-down |
animationDuration | Text field animation duration in ms | Number | 225 |
fontSize | Text field font size | Number | 16 |
labelFontSize | Text field label font size | Number | 12 |
baseColor | Text field base color | String | rgba(0, 0, 0, .38) |
textColor | Text field text color | String | rgba(0, 0, 0, .87) |
iconColor | Text field icon color | String | rgba(0, 0, 0, 1) |
itemColor | Dropdown item text color (inactive item) | String | rgba(0, 0, 0, .54) |
selectedItemColor | Dropdown item text color (active item) | String | rgba(0, 0, 0, .87) |
disabledItemColor | Dropdown item text color (disabled item) | String | rgba(0, 0, 0, .38) |
dropdownPosition | Dropdown position (dynamic if undefined) | Number | - |
itemCount | Dropdown visible item count | Number | 4 |
itemPadding | Dropdown item vertical padding | Number | 8 |
itemTextStyle | Dropdown item text styles | Object | - |
dropdownOffset | Dropdown offset | Object | { top: 32, left: 0 } |
dropdownMargins | Dropdown margins | Object | { min: 8, max: 16 } |
data | Dropdown item data | Array | [] |
value | Selected value | String | - |
containerStyle | Styles for container view | Object | - |
overlayStyle | Styles for overlay view | Object | - |
pickerStyle | Styles for item picker view | Object | - |
shadeOpacity | Shade opacity for dropdown items | Number | 0.12 |
rippleOpacity | Opacity for ripple effect | Number | 0.54 |
rippleInsets | Insets for ripple on base component | Object | { top: 16, bottom: -8 } |
rippleCentered | Ripple on base component should be centered | Boolean | false |
renderBase | Render base component | Function | - |
renderAccessory | Render text field accessory | Function | - |
valueExtractor | Extract value from item (args: item, index) | Function | ({ value }) => value |
labelExtractor | Extract label from item (args: item, index) | Function | ({ label }) => label |
propsExtractor | Extract props from item (args: item, index) | Function | () => null |
onChangeText | Selection callback (args: value, index, data) | Function | - |
Other TextField, TextInput and TouchableWithoutFeedback properties will also work
name | description | returns |
---|---|---|
focus() | Acquire focus (open dropdown) | - |
blur() | Release focus (close dropdown) | - |
value() | Get current value | String |
selectedIndex() | Get selected index | Number |
selectedItem() | Get selected item | Object |
isFocused() | Get current focus state | Boolean |
git clone https://github.com/mdslab87/react-native-material-dropdown
cd react-native-material-dropdown/example
npm install
npm run ios # or npm run android
BSD License
Copyright 2017-2018 Alexander Nazarov. All rights reserved.
FAQs
Material dropdown
The npm package react-native-material-dropdown-v2-fixed receives a total of 379 weekly downloads. As such, react-native-material-dropdown-v2-fixed popularity was classified as not popular.
We found that react-native-material-dropdown-v2-fixed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.