Git Product home page Git Product logo

react-native-cascade-picker's Introduction

React Native Cascade Picker

react-native cascade picker for ios iOS & Android,use such as region picker,unlimited depth level.

Installation

npm install --save react-native-cascade-picker
# OR
yarn add react-native-cascade-picker

Usage

import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import CascadePicker from 'react-native-cascade-picker';
import areaData from './area.json';

export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <CascadePicker
          onSelect={(region) => {

          }}
          data={areaData}
          value={[
            {
              "value": "510000",
              "label": "四川省",
            },
            {
              "value": "510100",
              "label": "成都市",
            },
            {
              "value": "510182",
              "label": "彭州市",
            },
          ]}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5FCFF',
    marginTop: 40,
  },
});

react-native-cascade-picker's People

Contributors

jys125773 avatar

Watchers

James Cloos avatar AricGamma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.