clarify the picker onValueChange
Summary: In the current docs, it's not quite clear, at the first sight, what the `lang` parameter passed to `onValueChange` is. This makes it obvious. Closes https://github.com/facebook/react-native/pull/13617 Differential Revision: D4969592 Pulled By: javache fbshipit-source-id: e94bedefebbe19d838d010f0c79d9a76743a4341
This commit is contained in:
parent
00a0343a6d
commit
7888c06a7b
|
@ -77,7 +77,7 @@ class PickerItem extends React.Component {
|
||||||
*
|
*
|
||||||
* <Picker
|
* <Picker
|
||||||
* selectedValue={this.state.language}
|
* selectedValue={this.state.language}
|
||||||
* onValueChange={(lang) => this.setState({language: lang})}>
|
* onValueChange={(itemValue, itemIndex) => this.setState({language: itemValue})}>
|
||||||
* <Picker.Item label="Java" value="java" />
|
* <Picker.Item label="Java" value="java" />
|
||||||
* <Picker.Item label="JavaScript" value="js" />
|
* <Picker.Item label="JavaScript" value="js" />
|
||||||
* </Picker>
|
* </Picker>
|
||||||
|
|
Loading…
Reference in New Issue