Skip to content

onActivated/onDeactivated not triggered when re-mount/unmount a v-if descendant component #11672

@Qzki

Description

@Qzki

Vue version

3.4.38

Link to minimal reproduction

https://play.vuejs.org/#eNqFU91u2jAUfhXPN4DUJRfdxdSFaIz1opu2Vv25s1SlziG4dezIdlIkxLv3OAkGWkiRkJLz/fj4nC9rOquqqKmBXtDEciMqRyy4ukqZEmWljSN/AaqZFA3cZ6YARxZGl2QUxe/q3mT0g6kk7mzQAF8clJXMHOAbwV8SROnusfeN02TnifwkDmJ6Rp3lWi1EET1brbDZtTdklOuyEhLMdeWEVpbRC9IiHsuk1K9/2pozNZxt63wJ/OVI/dmufI3RGwMWTAOMBsy1PXbw5d1/WOFzAEud1xLZA+AtWC1r32NH+1WrHNve47XdXrUjF6q4t5crB8puL+Ub9cxNy2cUhz0fuPqu3fPoW6tjaoNTPLKz04tfEwMLsukX3q+3x+Za5cKfm8n5Usg8pOI9sI0Fbs9idmRWkKn3HfsbTT7Ny4dzmq9iMWXUGzGKmel5T7VzWpGfXAr+0uN40JeOl969CseXSdzRDsPFFA7mWNtDk9HqQZW6Vg7yExPynN+QcScaPGWI9e9Tn9kpF6aCfDyekGnaRcAPW0uIpC7GjAYKoxOMAf69LHgOCQPpQBquPiQNpAPp3kRQPE2PSvdIQTwYk6tRSdwSCG9X93G7jw0Y/ynhRvF7iM6/080bGN+03A==

Steps to reproduce

Click 'Switch' button to unmount/remount the descendant component.

What is expected?

According to the documentation, onActivated/onDeactivated should get called when mount/unmount even on a descendant component.

What is actually happening?

onActivated triggered only on first mount, then click 'Switch' button to unmount/re-mount the component will trigger neither of onDeactivated and onActivated.

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    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