Skip to content

BottomNavBar inside menu ignores switchScreen: false and navigates to item page #2018

@ridsashabbir

Description

@ridsashabbir

When using the BottomNavBar component within the menu section of a View, the switchScreen: false property is not being executed. Despite explicitly setting switchScreen: false in the tab item configuration, tapping on the tab still causes navigation to the page specified in the item.

Expected behavior is that switchScreen: false should prevent automatic navigation and instead allow custom behavior defined in onTap. This behavior works correctly when the BottomNavBar is placed directly inside a ViewGroup, but not when it's inside the menu.

Steps to Reproduce:

  • Place BottomNavBar under the menu section of a View.
  • Set switchScreen: false for a tab item and provide a custom onTap logic (e.g., execute some storage operations and manual navigation).
  • Tap the tab.

Actual Result:
The app still navigates to the page defined in the item despite switchScreen: false.

Expected Result:
switchScreen: false should disable default screen navigation and allow only the onTap logic to execute.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions