Search code examples
nativescriptnativescript-vue

NativeScript BottomNavigation -> how to open default page on bottom navigation item tap?


I have page called "Fund". I have bottom navigation with 5 tabs - "Home" / "Portfolio" and 3 others. In default behaviour all tabs has it's own navigation stack and if opened "Fund" in Home and then opened Portfolio when i return to Home "Fund" still be opened.

My goal is open default page for opened bottom navigation tab on every touch.

Here is the sample code {N} Playground


Solution

  • Solved in this issue

    It's quite possible Frame.topmost() gets confused during tab transition. However, you can access a certain tab frame and call goBack() for it. Check this playground and let me know if it solves your problem: https://play.nativescript.org/?template=play-tsc&id=4Ij5yz&v=7