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
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.
The text was updated successfully, but these errors were encountered:
Version
2.5.16
Reproduction link
https://jsfiddle.net/86us8zxz/2/
Steps to reproduce
Attach a
new Set()
object to thedata
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.
The text was updated successfully, but these errors were encountered: