🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@rn-components-kit/scroll-picker

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-components-kit/scroll-picker

Selecting option by scrolling operation.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

ScrollPicker

NPM version

English | 中文

Selecting option by scrolling operation. It supports following features:

  • smoothing the differences between Android and iOS platforms
  • multiple picker items
  • cascading operation
  • customized option content in ScrollPicker.Item

How to use

npm install @rn-components-kit/scroll-picker --save
PreviewCode
Demo1 Code
Demo2 Code
Demo3 Code

Props

Reference

Props

style

Allow you to customize style

TypeRequiredDefault
objectno-

itemHeight

Height of each item in ScrollPicker.Item

TypeRequiredDefault
numberno30

onValueChange

(value: {[key: string]: any}) => void;

A callback will be triggered when ScrollPicker.Item's selected value changes

TypeRequiredDefault
functionno() => {}

Props for ScrollPicker.Item

id

A unique identifier in ScrollPicker

TypeRequiredDefault
stringyes-

flex

How much of the remaining space in the flex container

TypeRequiredDefault
numberno1

data

Data source of options

TypeRequiredDefault
T[]yes-

defaultValue

Default value to speficy which option is selected initially (must be one of data)

TypeRequiredDefault
Tnodata[0]

renderItem

(params: {item: T, index: number}) => React.ReactElement;

Allows you to customize content style

TypeRequiredDefault
functionyes-

Keywords

react-native

FAQs

Package last updated on 19 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts