You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just figured out that my <recycle-scroller :items="items"> does not reactivley updates if I use splice on my reactive items in order to add or remove some elements. My array is provided as const items = ref([]) and I use items.value.splice.
The very same approach for the vue2 version is working fine.
In vue2, an (not deep) array watcher triggers on push, pop and splice, but
in vue3 they have changed/corrected it to only trigger on shallow changes.
@Akryum Do you think you may change your array watcher to a deep watch or are you going to keep it how it is?
Please see the minimal reproduction example.
A re-render only happens for example on resize or if I use the <dynamic-scroller> or if it re-reference the items again..
Describe the bug
Hi, I just figured out that my
<recycle-scroller :items="items">
does not reactivley updates if I use splice on my reactive items in order to add or remove some elements. My array is provided asconst items = ref([])
and I useitems.value.splice
.The very same approach for the vue2 version is working fine.
In vue2, an (not deep) array watcher triggers on
push
,pop
andsplice
, butin vue3 they have changed/corrected it to only trigger on shallow changes.
@Akryum Do you think you may change your array watcher to a deep watch or are you going to keep it how it is?
Please see the minimal reproduction example.
A re-render only happens for example on resize or if I use the
<dynamic-scroller>
or if it re-reference the items again..Reproduction
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: