Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v6] componentDidAppear not triggered when changing bottomtabs using mergeOptions #6143

Closed
didrikkvanvik opened this issue Apr 21, 2020 · 5 comments

Comments

@didrikkvanvik
Copy link

didrikkvanvik commented Apr 21, 2020

Issue Description

componentDidAppear is not triggered when changing the current bottomTab using mergeOptions. Everything works fine when pressing a bottomTab. I've used the recommended way of navigating between tabs, as stated in the documentation. I believe this is a result of having the
tabsAttachMode in bottomTabs options set to onSwitchToTab

Steps to Reproduce / Code Snippets / Screenshots

The following code is how i navigate to another tab:

Navigation.mergeOptions(componentId, { bottomTabs: { currentTabIndex: tabIndex } })

The tabIndex is the index of the tab we're switching to.


Environment

  • React Native Navigation version: v6.0.1
  • React Native version: v0.61.4
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator (Debug)
@guyca
Copy link
Collaborator

guyca commented Apr 21, 2020

Hey @didrikkvanvik Have you tried updating to latest version? Also on which iOS version have you tested?
Are you sure this happens on both platforms?

@didrikkvanvik
Copy link
Author

I've only tested on iOS so far with version 13.4.1. We're experiences another crucial bug with react-native-navigation that prohibits us from updating to the latest version. After patching the bug, we tried to update to the latest RNN version, but the bug still occurs even with the patch. So I haven't tried with the latest RNN version. Can't seem to find anything in the changelog that would fix this issue though since v6.0.1 (correct me if i'm wrong).

@guyca
Copy link
Collaborator

guyca commented Apr 23, 2020

@didrikkvanvik Can you confirm the appear event works as expected with afterInitialTab?

@stale
Copy link

stale bot commented May 23, 2020

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 version and report back. Thank you for your contributions.

@stale stale bot added the 🏚 stale label May 23, 2020
@stale
Copy link

stale bot commented May 30, 2020

The issue has been closed for inactivity.

@stale stale bot closed this as completed May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants