core icon indicating copy to clipboard operation
core copied to clipboard

fix(vMemo): prevent unexpected render in v-for + v-memo

Open Doctor-wu opened this issue 11 months ago • 15 comments

This PR fixes the unexpected render when v-memo is used in a keyed v-for list. In the past, we just used an array as the renderCache of a list whatever if it is keyed. This PR adds a map that uses nodes.key as key and node 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

Doctor-wu avatar Feb 29 '24 09:02 Doctor-wu