react-native-drop-down

2.0.4 • Public • Published

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

Package Sidebar

Install

npm i react-native-drop-down

Weekly Downloads

1

Version

2.0.4

License

ISC

Last publish

Collaborators

  • leiliang752