react-native-drop-down
A refresh component in pure javascript for support.
Usage
Step 1 - install
npm install react-native-drop-down --save
DropView
Usage
Step 2 Code like this:
import {DropView} from 'react-native-drop-down';
onDropRelease(resolve) {
//do something
setTimeout(() => {
resolve();
}, 3000);
}
<DropView onDropRelease={this.onDropRelease}>
//<Children />
</DropView>
DropListView
Usage
Step 3 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 |