Install
npm install react-native-selector --save
API
Props
Type
Description
optionsData
PropTypes.array
select的数据源
onSelect
PropTypes.func
选择事件,函数参数为选择的item
selectedOption
PropTypes.object
选中的item
topStyle
PropTypes.any
select的样式
placeholder
PropTypes.string
select默认展示的文本,优先级大于选中的item
example
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import Select from '../index';
const sellStatusOptions = [{name: '全部', value: -1}, {name: