Skip to content

Commit

Permalink
Fixed PickerIOS onChange event
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Sep 8, 2015
1 parent 8586f89 commit ad0c97f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Libraries/Picker/PickerIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ var styles = StyleSheet.create({
},
});

var RCTPickerIOS = requireNativeComponent('RCTPicker', null);
var RCTPickerIOS = requireNativeComponent('RCTPicker', PickerIOS, {
nativeOnly: {
items: true,
onChange: true,
selectedIndex: true,
},
});

module.exports = PickerIOS;
1 change: 1 addition & 0 deletions React/Views/RCTPickerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ - (UIView *)view

RCT_EXPORT_VIEW_PROPERTY(items, NSDictionaryArray)
RCT_EXPORT_VIEW_PROPERTY(selectedIndex, NSInteger)
RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock)

- (NSDictionary *)constantsToExport
{
Expand Down

0 comments on commit ad0c97f

Please sign in to comment.