react-native-scrollable-tab-view
react-native-scrollable-tab-view copied to clipboard
Is the project dead already?
It seems no any resp from maintainer
Please update the following components: *, ScrollableTabBar
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
Is there a fix to that? Facing the same issue...
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);
}
}
}
Feel free to send a PR if this is a new behaviour of RN