react-native-scrollable-tab-view icon indicating copy to clipboard operation
react-native-scrollable-tab-view copied to clipboard

Is the project dead already?

Open calltaxinike opened this issue 3 years ago • 4 comments

It seems no any resp from maintainer

calltaxinike avatar Dec 30 '21 10:12 calltaxinike

Please update the following components: *, ScrollableTabBar

plus24-library avatar Mar 03 '22 05:03 plus24-library

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

Luckywannnnng avatar Mar 20 '22 13:03 Luckywannnnng

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

Roc8Trppn avatar May 15 '22 11:05 Roc8Trppn

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);
         }
       }
     }

davidseek avatar Jun 14 '22 05:06 davidseek

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

ptomasroos avatar Dec 06 '22 20:12 ptomasroos