Skip to content

2 Navigators in BottomNavigation has unexpected behaviour #29

Closed
@darylteo

Description

@darylteo
<template>
    <Page>
        <BottomNavigation @selectedIndexChanged="onBottomNavigationIndexChanged">
            <TabStrip>
                <TabStripItem class="navigation__item" @tap="() => onTabTap(0)">
                    <Label text="News"></Label>
                    <Image src.decode="font://&#xf015;" class="fas t-36"></Image>
                </TabStripItem>
                <TabStripItem class="navigation__item">
                    <Label text="Settings"></Label>
                    <Image src.decode="font://&#xf013;" class="fas t-36"></Image>
                </TabStripItem>
            </TabStrip>

            <TabContentItem>
                <Frame id="frame-1" ref="frame-1">
                    <Page>
                        <Navigator defaultRoute="/feed"/>
                    </Page>
                </Frame>
            </TabContentItem>

            <TabContentItem>
                <Frame id="frame-2" ref="frame-2">
                    <Page>
                        <Navigator defaultRoute="/settings"/>
                    </Page>
                </Frame>
            </TabContentItem>
        </BottomNavigation>
    </Page>

/feed route

                this.$navigator.navigate('/article', {
                    props: {
                        articleId: id,
                    },
                    frame: 'frame-1', // without this, it navigates in frame-2
                });

I expected it to know which frame it was held within and navigate accordingly.

Not the end of the world, just means I have to manually specify the frame, which may not be ideal, as there might be several paths to the same page in each tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions