react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Can't mergeOptions when click on overlay component

Open hanzoow opened this issue 6 years ago • 3 comments

Issue Description

I want to change index of bottomTabs when click on my overlay component but it seems doesn't work.

Steps to Reproduce / Code Snippets / Screenshots

This is where i do mergeOptions _onIconPress() { Navigation.mergeOptions('customBottom', { bottomTabs:{ currentTabIndex:2 } }); }

This is where i declare my overLay Navigation.showOverlay({ component: { id: 'customBottom', name: Screens.KEY_BOTTOM_BAR, options:{ overlay:{ interceptTouchOutside:false } } }, }); Can you guys show me the way to change index of bottomTabs when using overLay, or what i did wrong ?

Environment

  • React Native Navigation version: ^6.0.1
  • React Native version: 0.61.5
  • Platform(s) (iOS, Android, or both?): Both
  • Device info (Simulator/Device? OS version? Debug/Release?): Samsung Galaxy A7. Debug mode

hanzoow avatar Jul 27 '20 12:07 hanzoow

I also have this problem, on iOS

Rotemy avatar Jul 27 '20 17:07 Rotemy

Check componentId that you pass to mergeOptions. It should not be a componentId of any overlay rather than screen

sintylapse avatar Jul 29 '20 16:07 sintylapse

Please use the componentId of the screen in the BottomTab stack

jinshin1013 avatar Jul 29 '20 23:07 jinshin1013