Skip to content

bug: Vue routing in tabs mode cause re-render #18292

Closed
@xar

Description

@xar

Bug Report

Ionic version:
[x] 4.4

Current behavior:
Simple tabs structure in vue project with ionic vue router. When I switch tab previous component is removed from DOM and after that It needs to be fully re-rendered when I go back to that tab. It's reproducible also on ionic-vue-conference app. But working correctly on ionic-conference-app.

Expected behavior:
Component doesn't get removed but will be hidden.

Steps to reproduce:
Ionic conference app bug

Related code:

<ion-tabs>
    <ion-tab tab="dashboard">
        <!--                <DashboardIndex />-->
        <ion-vue-router name="dashboard" />
    </ion-tab>
    <ion-tab tab="benefits" :routes="['page2']">
        <ion-vue-router name="page2" />
    </ion-tab>
    <ion-tab tab="results" :routes="['page3']">
        <ion-vue-router name="page3" />
    </ion-tab>
    <ion-tab tab="profile" :routes="['page4']">
        <ion-vue-router name="page4" />
    </ion-tab>
    <template slot="bottom">
        <ion-tab-bar :key="1">
            <ion-tab-button v-for="tab in tabs" :key="tab.routeName" :tab="tab.routeName">
                <ion-label>{{ tab.title }}</ion-label>
                <ion-icon name="home"></ion-icon>
            </ion-tab-button>
        </ion-tab-bar>
    </template>
</ion-tabs>

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