Skip to content

A cascade picker component written in pure JavaScript for React Native

License

Notifications You must be signed in to change notification settings

rn-parts/rn-cascade-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rn-cascade-picker

A cascade picker component written in pure JavaScript for React Native

Latest Version on NPM npm github issues github closed issues

Installation

yarn add rn-cascade-picker

Peer Dependencies

"react": ">= 16.13.1",
"react-native": ">= 0.63.4"

Usage

# demo
cd example
yarn
yarn ios

demo png

demo gif

Props

Prop Type Default Description
visible Boolean false determine whether Picker is visible or not
data Array<{value, label, children: Array}> - data source
value Array - the value, the format is [value1, value2, value3], corresponds to the level value of the data source
cols Number 3 col numbers
title String - title
cancelText String cancel cancel text
confirmText String confirm confirm text
titleTextStyle Object - style of title text
cancelTextStyle Object - style of cancel text
confirmTextStyle Object - style of confirm text
onCancel (): void - cancel handler
onConfirm (val): void - confirm handler

Contribution

If you want to add some features, feel free to submit PR.

License

MIT.