fix(Teleport): modifying non-essential attributes does not require up…#14438
fix(Teleport): modifying non-essential attributes does not require up…#14438edison1105 merged 1 commit intovuejs:minorfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
|
|
||
| disabled.value = true | ||
| await nextTick() | ||
| expect(beforeEnter).toHaveBeenCalledTimes(1) |
There was a problem hiding this comment.
This is not correct. According to your reproduction, beforeEnter should not be executed at all.
There was a problem hiding this comment.
When disabled turns from false to true, the nodes will change their positions. I think this is correct.
There was a problem hiding this comment.
It's not. Only actual mount/unmount will trigger enter/leave animations. This aligns with vdom teleport behavior.
Thanks for the PR. I've made a new PR address for this. see #14440
There was a problem hiding this comment.
If disabled is already true, modifying the to attribute does not need to trigger the handlePropsUpdate method
if (wasDisabled !== this.isDisabled || prevTo !== this.resolvedProps.to) {
this.handlePropsUpdate()
}There was a problem hiding this comment.
uhh~
should be
if (
wasDisabled !== this.isDisabled ||
(!this.isDisabled && prevTo !== this.resolvedProps.to)
) {
this.handlePropsUpdate()
}Could you please rebase your PR and include this changes?
940e227 to
3bda5e0
Compare
Problem Description
In Teleport, modifying non-critical attributes will still update the animation effects.
Version
v3.6.0-beta.5
Steps to reproduce
Click 'change-defer' button
Link to minimal reproduction
Playground