react-native-wheely-simple-picker

1.0.1 • Public • Published

react-native-wheely-good-picker

changes in fork

  • ensured scroll on footer is forbidden (no more scrolling under list)
  • applied some Airbnb eslint rules

a pure js picker, each option item customizable

example

usage

npm i react-native-wheely-simple-picker

import React, {Component} from 'react';
import ScrollPicker from 'react-native-wheely-good-picker';
 
export default class SimpleExample extends Component {
 
    render() {
        return(
             <ScrollPicker
                  dataSource={[
                       'a',
                       'b',
                       'c',
                       'd',
                  ]}
                  selectedIndex={1}
                  renderItem={(data, index, isSelected) => {
                      //
                  }}
                  onValueChange={(data, selectedIndex) => {
                      //
                  }}
                  wrapperHeight={180}
                  wrapperWidth={150}
                  wrapperBackground="#FFFFFF"
                  itemHeight={60}
                  highlightColor="#d8d8d8"
                  highlightBorderWidth={2}
                  activeItemColor="#222121"
                  itemColor="#222121"
                />
        )
    }
}

Package Sidebar

Install

npm i react-native-wheely-simple-picker

Weekly Downloads

13

Version

1.0.1

License

MIT

Unpacked Size

56.2 kB

Total Files

5

Last publish

Collaborators

  • amrulhaq