-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
fix(vMemo): prevent unexpected render in v-for + v-memo #10431
base: main
Are you sure you want to change the base?
Conversation
Size ReportBundles
Usages
|
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
@baiwusanyu-c could you help to re-run the ecosystem-ci? |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Could you please resolve the conflicts? |
Sure, glad to see this PR finally noticed by others😁 |
@vue/compiler-core
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-dom
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
I also added corresponding test case |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
language-tools failed seems not related to this PR |
/ecosystem-ci run language-tools |
📝 Ran ecosystem CI: Open
|
This PR fixes the unexpected render when
v-memo
is used in a keyedv-for
list. In the past, we just used an array as therenderCache
of a list whatever if it is keyed. This PR adds a map that usesnodes.key
as key andnode
as the value to the cache. When updates, if a list is keyed, it will check the cache from the map, so that can prevent unexpected render.close #10392