timomeh / react-native-material-bottom-navigation

💅🔧👌 a beautiful, customizable and easy-to-use material design bottom navigation for react-native
MIT License
711 stars 127 forks source link

Update default Tab index #114

Open mustafaskyer opened 5 years ago

mustafaskyer commented 5 years ago

I have many routes [likes, search, home, profile, settings] and suggest making the default route to be in the middle, or we can add defaultTab prop into tabs property which should be the default regards

timomeh commented 5 years ago

Thank you very much for your contribution!

Setting it to the middle tab seems too specific for your use case. But adding the defaultTabIndex prop as you suggested sounds good. The same thing was already discussed in https://github.com/timomeh/react-native-material-bottom-navigation/issues/102#issuecomment-415427696. It would be great if you could implement defaultTabIndex.

Bonus points if no tab would be active if the defaultTabIndex prop isn't set. 🙂 This would finally resolve #102

mustafaskyer commented 5 years ago

thanks, @timomeh commit updated :), now expects defaultTabIndex, regards