react-native-drop-down
v2.0.4
Published
DropView & DropListView component in React Native , pull to refresh, support both Android and IOS
Downloads
28
Maintainers
Readme
react-native-drop-down
A refresh component in pure javascript for support.
###Usage
####Step 1 - install
npm install react-native-drop-down --save
####Step 2 DropView
Usage
Code like this:
import {DropView} from 'react-native-drop-down';
onDropRelease(resolve) {
//do something
setTimeout(() => {
resolve();
}, 3000);
}
<DropView onDropRelease={this.onDropRelease}>
//<Children />
</DropView>
####Step 3 DropListView
Usage
Code like this:
import {DropListView} from 'react-native-drop-down';
onDropRelease(resolve) {
//do something
setTimeout(() => {
resolve();
}, 3000);
}
<DropListView onDropRelease={this.onPullRelease} {...and some ListView Props}/>
####Step 4 Properties
| Prop | Default | Type | Description |
| :------------ |:---------------:| :---------------:| :-----|
| style | null | style
| style of the DropView or DropListView |
| dropOkMargin | 100 | number
| Down to the height of the ok state |
| topIndicatorHeight | 30 | number
| Top Refresh the height of the indicator |
| duration | 300 | number
| The duration of the animation |
| topIndicatorRender | null | func
| Drop-down function to refresh the control |
| onDropRelease | - | func
| Down to release the state to be implemented under the function |
| onDropOk | - | func
| Down to ok the state to be implemented under the function |
| onDropDown | - | func
| Down to drop down the state to be implemented under the function