Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie authored Jan 7, 2018
2 parents 1bd104f + 80d4538 commit a88d01f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions RNTableView/RNTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,11 @@ -(BOOL)hasCustomCells:(NSInteger)section {
#pragma mark - Scrolling

-(void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (!self.onScroll) {
// When rendering, `self.tableView.delegate` may be set before `onScroll` is passed in.
return;
}

self.onScroll(@{
@"target": self.reactTag,
@"contentOffset": @{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-tableview",
"version": "2.0.0",
"version": "2.0.1",
"description": "Native iOS TableView wrapper for React Native",
"main": "src/index.js",
"types": "src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/TableView.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TableView extends React.Component {
onAccessoryPress: PropTypes.func,
onWillDisplayCell: PropTypes.func,
onEndDisplayingCell: PropTypes.func,
selectedValue: PropTypes.oneOf([PropTypes.string, PropTypes.number]), // string or integer basically
selectedValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), // string or integer basically
autoFocus: PropTypes.bool,
autoFocusAnimate: PropTypes.bool,
alwaysBounceVertical: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ interface TableViewProps {
showsHorizontalScrollIndicator?: boolean
showsVerticalScrollIndicator?: boolean
moveWithinSectionOnly?: boolean
selectedValue?: any
selectedValue?: string | number
json?: string
filter?: string
contentInset?: EdgeInsetsPropType
Expand Down

0 comments on commit a88d01f

Please sign in to comment.