NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Listener for Tabs

Open justfede opened this issue 9 years ago • 5 comments

Hi guys! There's any way to fire an event when a tab is selected?

I tried with componentDidMount but it only fires once.. (I need to handle several tab changes)

Thanks!

justfede avatar Mar 09 '17 00:03 justfede

<Tabs onChangeTab={(i, ref)=> console.log(i)}> You can use the onChangeTab callback.

sankhadeeproy007 avatar Mar 09 '17 09:03 sankhadeeproy007

Please add this to docs as well.

naman03malhotra avatar Sep 14 '17 17:09 naman03malhotra

the right is <Tabs onChangeTab={({ i, ref, from })=> console.log(i)}>

ikhsanalatsary avatar Oct 04 '17 06:10 ikhsanalatsary

my app crashes when i call setState with onChangeTab.

rubinjohny avatar Oct 12 '18 11:10 rubinjohny

@rubinjohny same issue. https://github.com/GeekyAnts/NativeBase/issues/2359

n-sviridenko avatar Oct 13 '18 08:10 n-sviridenko