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.94k stars 2.28k forks source link

after update to V1.0.0 , change tabsIndex from outside is not working !!! #1080

Open newCaoTao opened 4 years ago

newCaoTao commented 4 years ago

in V0.10.0 , I change tabsIndex from outside is by using props : "page" , as following source code: <ScrollableTabView {...this.pageProps} ... page={props.tabsIndex} ... />

and in the outside View, I change tabsIndex as following source code: dispatch({ type: types.CHANGE_TAB_INDEX, tabsIndex: index });

It's working well in V0.10.0 , but after I update react-native-scrollable-tab-view to V1.0.0, It's not working any more !! , Could anyone help me about this quesion ? Thanks a lot !!!

ptomasroos commented 4 years ago

You can create a example repo like the ISSUE_TEMPLATE is saying and we can take a look at it in order to help you

shystruk commented 4 years ago

Try to replace page by initialPage. https://github.com/ptomasroos/react-native-scrollable-tab-view#props