react-native-wheel-view-view

native wheel view


Keywords
react-native, ios, android
License
MIT
Install
npm install react-native-wheel-view-view@0.1.0

Documentation

react-native-wheel-view

原生滚轮组件,安卓IOS均为原生实现

安卓使用WheelPicker

IOS使用系统组件

Installation

npm install react-native-wheel-view-view

Usage

import { WheelViewView } from 'react-native-wheel-view-view';

// 高度不能为0
<WheelViewView
  style={{ flex: 1 }}
  data={['1', '2', '3', '4', '5']}
  selectedIndex={selectedIndex}
  onItemSelected={(event) => {
    console.log(event.nativeEvent.data, event.nativeEvent.position, '选中的');
    setSelectedIndex(event.nativeEvent.position);
  }}
/>;

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library