Pārlūkot izejas kodu

Send bottomTabSelected event by tab index

relates to #2711
Guy Carmeli 6 gadus atpakaļ
vecāks
revīzija
ddac4b88bd

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/layouts/BottomTabsLayout.java Parādīt failu

@@ -491,7 +491,7 @@ public class BottomTabsLayout extends BaseLayout implements AHBottomNavigation.O
491 491
     }
492 492
 
493 493
     private void sendTabSelectedEventToJs(int selectedTabIndex, int unselectedTabIndex) {
494
-        String navigatorEventId = getCurrentScreenStack().peek().getNavigatorEventId();
494
+        String navigatorEventId = screenStacks[selectedTabIndex].peek().getNavigatorEventId();
495 495
         WritableMap data = createTabSelectedEventData(selectedTabIndex, unselectedTabIndex);
496 496
         NavigationApplication.instance.getEventEmitter().sendNavigatorEvent("bottomTabSelected", navigatorEventId, data);
497 497