The Wayback Machine - https://web.archive.org/web/20250524130552/https://github.com/vuejs/vue/issues/9454
Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add beforeDeactivated hook #9454

Copy link
Copy link
Open
@danyadev

Description

@danyadev
Issue body actions

What problem does this feature solve?

I use :key and keep-alive tag to display chats. And in order to maintain the position of the scroll when switching between chat rooms, I need to save the scrollTop when the hook is deactivated and put it on the element when the hook is activated. But the deactivated hook is already called when the element has been removed from the DOM, so I needed a new hook - beforeDeactivated.

Seriously, this hook is needed just like the others before* hooks.

What does the proposed API look like?

Here, I think, everything is clear. Simple hook.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.