Skip to content

shallowReactive Set not tracking Array.from or spread #1210

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

Closed
doman412 opened this issue May 20, 2020 · 2 comments · Fixed by #1212
Closed

shallowReactive Set not tracking Array.from or spread #1210

doman412 opened this issue May 20, 2020 · 2 comments · Fixed by #1212

Comments

@doman412
Copy link

Version

3.0.0-beta.14

Reproduction link

https://jsfiddle.net/6mxscrao/1/

Steps to reproduce

  • create a shallowReactive(new Set())
  • log Array.from(myShallowSet) within an effect
  • effect debug function onTrack is not called and changes to set have no effect.

What is expected?

Array.from(shallowSet) should track and iteration event inside an effect.

What is actually happening?

effect is not tracking the operation which leads to changes not triggering the effect.


Non-shallow reactive Sets do seem to track. I have not tried other collection types.

@pikax
Copy link
Member

pikax commented May 20, 2020

Good spot! Thank you.

Will PR it in a bit

@zhangzhonghe
Copy link
Member

@pikax Good job!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants