Skip to content
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

Set object is not reactive #8272

Closed
ssche opened this issue May 30, 2018 · 1 comment
Closed

Set object is not reactive #8272

ssche opened this issue May 30, 2018 · 1 comment

Comments

@ssche
Copy link

ssche commented May 30, 2018

Version

2.5.16

Reproduction link

https://jsfiddle.net/86us8zxz/2/

Steps to reproduce

Attach a new Set() object to the data attribute of a component and modify it by using the set's methods (add, delete, etc).

What is expected?

Changes in the set would reflect in the rendered HTML, just like they do for arrays.

What is actually happening?

Nothing - the change of the set isn't picked up by Vue, making this property not reactive. This is unusual because mutations of an array works as expected (see link).

Additional notes

https://jsfiddle.net/86us8zxz/3/ shows that the change in the set seems to be detected (unless the reactive system of Vue works different to my understanding) as the view updates when the set is converted to an array.

@posva posva closed this as completed May 30, 2018
@posva posva reopened this May 30, 2018
@posva
Copy link
Member

posva commented May 30, 2018

Duplicate of #6774

@posva posva marked this as a duplicate of #6774 May 30, 2018
@posva posva closed this as completed May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants