Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shexiaoheng
committed
Aug 3, 2016
1 parent
79b3c88
commit 9f2d4df
Showing
22 changed files
with
208 additions
and
315 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React,{ | ||
Component, | ||
PropTypes | ||
} from 'react'; | ||
|
||
import ReactNative,{ | ||
requireNativeComponent | ||
} from 'react-native'; | ||
|
||
|
||
let NativeWheelView = requireNativeComponent('RCTWheelView',WheelView); | ||
|
||
|
||
export default class WheelView extends React.Component{ | ||
static propTypes = { | ||
onItemChange: PropTypes.func, | ||
values: PropTypes.array, | ||
isLoop: PropTypes.bool, | ||
selectedIndex: PropTypes.number, | ||
textSize: PropTypes.number, | ||
itemsVisible: PropTypes.number, | ||
velocityFling: PropTypes.number, | ||
}; | ||
|
||
_onItemChange(event) { | ||
if(this.props.onItemChange){ | ||
this.props.onItemChange(event.nativeEvent.index); | ||
} | ||
}; | ||
|
||
render(){ | ||
return <NativeWheelView {...this.props} onChange={this._onItemChange.bind(this)} />; | ||
} | ||
}; | ||
|
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
9f2d4df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong , not RN 0.20+ , it's RN 0.25.1