Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested elements in kept alive component are replaced before the transition #3950

Open
posva opened this issue Jun 14, 2021 · 1 comment · May be fixed by #3959
Open

Nested elements in kept alive component are replaced before the transition #3950

posva opened this issue Jun 14, 2021 · 1 comment · May be fixed by #3959

Comments

@posva
Copy link
Member

posva commented Jun 14, 2021

Version

3.1.1

Reproduction link

Playground

Steps to reproduce

  1. Click on toggle multiple times

What is expected?

It should transition from Foo Foo to Bar Bar and vice versa

What is actually happening?

It transitions from Foo Bar to Bar Bar and then Bar Foo Foo Foo


@edison1105
Copy link
Member

edison1105 commented Jun 16, 2021

I've re-thought the question. Maybe my PR is not correct.

There are two effects in the queue

  1. update of Transition
  2. update of Foo.vue
    After the queue is flushed, the animation takes effect.

So skipping the update of Foo.vue is not correct.
Maybe should delay updating Foo.vue after Transition has done.

Edit:
delay updating Foo.vue seems not updated the DOM.
I have started to believe this is not a bug.😓

Foo.vue will unmount without KeepAlive, so it will not update and the animation looks normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants