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

registerBottomTabSelectedListener returns incorrect unselectedTabIndex value #6318

Closed
peterh32 opened this issue Jun 17, 2020 · 0 comments · Fixed by #6326
Closed

registerBottomTabSelectedListener returns incorrect unselectedTabIndex value #6318

peterh32 opened this issue Jun 17, 2020 · 0 comments · Fixed by #6326

Comments

@peterh32
Copy link

registerBottomTabSelectedListener returns incorrect unselectedTabIndex

As of RNN 6.7.5, the registerBottomTabSelectedListener callback is now passed the correct value for selectedTabIndex, but unselectedTabIndex is not correct; it's always just the same as selectedTabIndex.

Note that both callback params were broken (always 0,0) in 6.7.4 -- here's that issue: #6254

Steps to Reproduce / Code Snippets / Screenshots

		this.bottomTabEventListener = RNN.events().registerBottomTabSelectedListener(
			({ selectedTabIndex, unselectedTabIndex }) => {
				console.tron.log(selectedTabIndex, unselectedTabIndex);
			}
		);

Will always log an identical pair, e.g. [0,0], [2,2] etc.


Environment

  • React Native Navigation version: 6.7.5
  • React Native version: 0.61.5
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator (did not test on device)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants