Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #1203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

test #1203

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const {

const ViewPagerAndroid = require('@react-native-community/viewpager');
const TimerMixin = require('react-timer-mixin');
const ViewPager = require('@react-native-community/viewpager');
const ViewPager = require('react-native-pager-view').default;

const SceneComponent = require('./SceneComponent');
const DefaultTabBar = require('./DefaultTabBar');
Expand Down Expand Up @@ -138,15 +138,15 @@ const ScrollableTabView = createReactClass({
if (Platform.OS === 'ios') {
const offset = pageNumber * this.state.containerWidth;
if (this.scrollView) {
this.scrollView.scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
this.scrollView.getNode().scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
}
} else {
if (this.scrollView) {
this.tabWillChangeWithoutGesture = true;
if (this.props.scrollWithoutAnimation) {
this.scrollView.setPageWithoutAnimation(pageNumber);
this.scrollView.getNode().setPageWithoutAnimation(pageNumber);
} else {
this.scrollView.setPage(pageNumber);
this.scrollView.getNode().setPage(pageNumber);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/brentvatne/react-native-scrollable-tab-view#readme",
"dependencies": {
"@react-native-community/viewpager": "3.3.0",
"react-native-pager-view": "^6.3.1",
"create-react-class": "^15.6.2",
"deprecated-react-native-prop-types": "^2.3.0",
"prop-types": "^15.6.0",
Expand Down