Skip to content

CLaszlo/react-native-fen-wheel-scroll-picker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Changes since fork

  • Added 'displayField' property, where you can pass in an object key (single level) to render, this is useful if you want to pass in an array of objects, and want to render one of the fields.
  • Added 'fontSize' and 'lineHeight' prop, to allow further customisation of the text element rendered inside each option.

react-native-wheel-scroll-picker

a pure js picker, each option item customizable

example

usage

npm install react-native-wheel-scroll-picker --save
import React, { Component } from "react";
import ScrollPicker from "react-native-wheel-scroll-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={"#B4B4B4"}
            />
        );
    }
}

About

a pure js picker, each option item customizable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%