mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 22:42:13 +08:00
Open source Android date and time pickers
Reviewed By: bestander Differential Revision: D2856486 fb-gh-sync-id: 0bb81136289e2f121387649765ba682103e4701b
This commit is contained in:
committed by
facebook-github-bot-8
parent
5f0ef12cb5
commit
9a0539d2c4
@@ -27,6 +27,12 @@ const {
|
||||
const Item = PickerAndroid.Item;
|
||||
|
||||
const PickerAndroidExample = React.createClass({
|
||||
|
||||
statics: {
|
||||
title: '<PickerAndroid>',
|
||||
description: 'Provides multiple options to choose from, using either a dropdown menu or a dialog.',
|
||||
},
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
selected1: 'key1',
|
||||
@@ -124,19 +130,11 @@ const PickerAndroidExample = React.createClass({
|
||||
this.setState({mode: newMode});
|
||||
},
|
||||
|
||||
onSelect: function(key, value) {
|
||||
onSelect: function(key: string, value: string) {
|
||||
const newState = {};
|
||||
newState[key] = value;
|
||||
this.setState(newState);
|
||||
},
|
||||
});
|
||||
|
||||
exports.title = '<PickerAndroid>';
|
||||
exports.displayName = 'PickerAndroidExample';
|
||||
exports.description = 'The Android Picker component provides multiple options to choose from';
|
||||
exports.examples = [
|
||||
{
|
||||
title: 'PickerAndroidExample',
|
||||
render(): ReactElement { return <PickerAndroidExample />; }
|
||||
},
|
||||
];
|
||||
module.exports = PickerAndroidExample;
|
||||
|
||||
Reference in New Issue
Block a user