From 71e5dd3e439d75ab5ccfe8a31de7f311f8a79c30 Mon Sep 17 00:00:00 2001 From: Tom Cat <48447545+tx-tomcat@users.noreply.github.com> Date: Sat, 1 Jun 2024 15:30:26 +0700 Subject: [PATCH 1/3] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ef9b36af..0fe4f238 100644 --- a/package.json +++ b/package.json @@ -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", From 716557a41466e72525b487526e6a1a75cb722a7e Mon Sep 17 00:00:00 2001 From: Tom Cat <48447545+tx-tomcat@users.noreply.github.com> Date: Sat, 1 Jun 2024 15:40:32 +0700 Subject: [PATCH 2/3] Update index.js --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index dc9d4f4e..fab67aae 100644 --- a/index.js +++ b/index.js @@ -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'); From 7827b682e433fe38ebc9670443983ded3650fd88 Mon Sep 17 00:00:00 2001 From: Tom Cat <48447545+tx-tomcat@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:18:52 +0700 Subject: [PATCH 3/3] Update index.js --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index fab67aae..25f23b69 100644 --- a/index.js +++ b/index.js @@ -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); } } }