Nativebase: Change Header Tabs trigger by other button?

Created on 13 Jun 2017  路  3Comments  路  Source: GeekyAnts/NativeBase

Hi, I did currently search the issues list but I could not find any answer here in github or in google.

I would like to change or jump to the other tabs using a button. Is there a way to switch tab via onPress function? or change within current state?

thanks,

UPDATE;
Sorry again, I have solve this issue, by adding ref and calling it by this one
this.refs.mytabs.goToPage(2);

but the problem it only update the tab but not the content, I tried different function via this.refs but it didnt update the content.

thanks,

Most helpful comment

Update, sorry again just accidentally solve the issue, I use page={} with state value to change via onPress

<Tabs initialPage={1} page={this.state.tabnum} ref="mytabs" >

just need to update your documentation so other user can use this setting.

All 3 comments

Update, sorry again just accidentally solve the issue, I use page={} with state value to change via onPress

<Tabs initialPage={1} page={this.state.tabnum} ref="mytabs" >

just need to update your documentation so other user can use this setting.

work great! thanks

eggybot 杩欎釜鏂规硶鍙 666

Was this page helpful?
0 / 5 - 0 ratings