I can see the request has been up before to support a custom onPress
https://github.com/wix/react-native-navigation/issues/5193 to a tab to trigger something like a modal (i.e Instagram add post behavior).
Is this something that will be supported or planed?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Let's make this feature happen!
We'll introduce bottomTab.selectTabOnPress
options which is true by default. If it's set to false, pressing a tab won't select the tab, instead it will emit a bottomTabPressedEvent
(BottomTabSelectedEvent
won't be emitted).
bottomTab: {
selectTabOnPress?: boolean
}
Listen to the press event globally
Navigation.events().registerBottomTabPressedListener(({ tabIndex, componentId }) => {
});
@guyca Awesome! Let me know if you need any help!
Any news on this feature?
Let's make this feature happen!
Spec
We'll introduce
bottomTab.selectTabOnPress
options which is true by default. If it's set to false, pressing a tab won't select the tab, instead it will emit abottomTabPressedEvent
(BottomTabSelectedEvent
won't be emitted).Options
bottomTab: { selectTabOnPress?: boolean }
Implementation
Listen to the press event globally
Navigation.events().registerBottomTabPressedListener(({ tabIndex, componentId }) => { });
@guyca
I've implemented this while ago, here is the patch file , works both in IOS and Android
https://gist.github.com/N3TC4T/9c06bc789529731bd54be689f210f20a
this patch is for v4.0.6 and this pull request is included in the patch.
@N3TC4T Nice. What's the thinking behind not submitting a PR for this patch? Thanks!
I made a PR from your code @N3TC4T https://github.com/wix/react-native-navigation/pull/5880
Most helpful comment
@guyca
I've implemented this while ago, here is the patch file , works both in IOS and Android
https://gist.github.com/N3TC4T/9c06bc789529731bd54be689f210f20a
this patch is for v4.0.6 and this pull request is included in the patch.