ptomasroos / react-native-scrollable-tab-view

Tabbed navigation that you can swipe between, each tab can have its own ScrollView and maintain its own scroll position between swipes. Pleasantly animated. Customizable tab bar
https://www.npmjs.com/package/react-native-scrollable-tab-view
6.93k stars 2.29k forks source link

Is the project dead already? #1168

Closed calltaxinike closed 1 year ago

calltaxinike commented 2 years ago

It seems no any resp from maintainer

plus24-library commented 2 years ago

Please update the following components: *, ScrollableTabBar

Luckywannnnng commented 2 years ago

I upgrade react-native to 0.65,and ScrollableTabBar not work,the error:this.scrollView.getNode is not a function,I just removed getNote(),use 'this.scrollView.scrollTo' instead of 'this.scrollView.getNode().scrollTo' and it works for me

Roc8Trppn commented 2 years ago

Is there a fix to that? Facing the same issue...

davidseek commented 2 years ago

I can confirm, that @Luckywannnnng's fix works. We just made 0.68.1 work with this patch:

diff --git a/node_modules/react-native-scrollable-tab-view/index.js b/node_modules/react-native-scrollable-tab-view/index.js
index 82e53c5..11a514b 100644
--- a/node_modules/react-native-scrollable-tab-view/index.js
+++ b/node_modules/react-native-scrollable-tab-view/index.js
@@ -119,7 +119,7 @@ const ScrollableTabView = createReactClass({
       this.updateSceneKeys({ page: this.state.currentPage, children: this.props.children, });
     }

-    if (this.props.page >= 0 && this.props.page !== this.state.currentPage) {
+    if (this.props.page !== prevProps.page && this.props.page >= 0 && this.props.page !== this.state.currentPage) {
       this.goToPage(this.props.page);
     }
   },
@@ -137,14 +137,14 @@ const ScrollableTabView = createReactClass({
     if (Platform.OS === 'ios') {
       const offset = pageNumber * this.state.containerWidth;
       if (this.scrollView) {
-        this.scrollView.getNode().scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
+        this.scrollView.scrollTo({x: offset, y: 0, animated: !this.props.scrollWithoutAnimation, });
       }
     } else {
       if (this.scrollView) {
         if (this.props.scrollWithoutAnimation) {
-          this.scrollView.getNode().setPageWithoutAnimation(pageNumber);
+          this.scrollView.setPageWithoutAnimation(pageNumber);
         } else {
-          this.scrollView.getNode().setPage(pageNumber);
+          this.scrollView.setPage(pageNumber);
         }
       }
     }
ptomasroos commented 1 year ago

Feel free to send a PR if this is a new behaviour of RN