From c6f58858d12e6f808125f4230a53566cc6f25688 Mon Sep 17 00:00:00 2001 From: donghanji Date: Sat, 30 May 2015 10:49:48 +0800 Subject: [PATCH] Update SegmentedControlIOSExample.js for event.nativeEvent ,the selectedIndex,can't work. issues is here: https://github.com/facebook/react-native/issues/1310 --- Examples/UIExplorer/SegmentedControlIOSExample.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/UIExplorer/SegmentedControlIOSExample.js b/Examples/UIExplorer/SegmentedControlIOSExample.js index 119196d8f8a97d..21cd987566bf0f 100644 --- a/Examples/UIExplorer/SegmentedControlIOSExample.js +++ b/Examples/UIExplorer/SegmentedControlIOSExample.js @@ -94,7 +94,7 @@ var EventSegmentedControlExample = React.createClass({ return { values: ['One', 'Two', 'Three'], value: 'Not selected', - selectedIndex: undefined + selectedSegmentIndex: undefined }; }, @@ -105,11 +105,11 @@ var EventSegmentedControlExample = React.createClass({ Value: {this.state.value} - Index: {this.state.selectedIndex} + Index: {this.state.selectedSegmentIndex} @@ -118,7 +118,7 @@ var EventSegmentedControlExample = React.createClass({ _onChange(event) { this.setState({ - selectedIndex: event.nativeEvent.selectedIndex, + selectedSegmentIndex: event.nativeEvent.selectedSegmentIndex, }); },