-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
readonly() breaks reactivity of Map #3602
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: reactivity
Comments
LinusBorg
added
🐞 bug
Something isn't working
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
scope: reactivity
labels
Apr 14, 2021
yyx990803
pushed a commit
that referenced
this issue
May 7, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: reactivity
Version
3.0.11
Reproduction link
[https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdD5cbiAgaW1wb3J0IHsgZGVmaW5lQ29tcG9uZW50LCBjb21wdXRlZCwgcmVhY3RpdmUsIHJlZiwgd2F0Y2hFZmZlY3QsIHJlYWRvbmx5IH0gZnJvbSAndnVlJ1xuICBcbiAgZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29tcG9uZW50KHtcbiAgICBzZXR1cCAoKSB7XG4gICAgICBjb25zdCBpZHMgPSByZWYoW10pXG4gICAgICBcbiAgICAgIGNvbnN0IGFkZElkcyA9ICgpID0 IHtcbiAgICAgICAgaWRzLnZhbHVlID0gWzEsMiwzLDRdXG4gICAgICB9XG4gICAgICBcbiAgICAgIGNvbnN0IGl0ZW1zID0gcmVhY3RpdmUobmV3IE1hcCgpKVxuICAgICAgLy8gY29uc3QgaXRlbXMgPSByZWYoe30pXG4gICAgICAvLyBjb25zdCBpdGVtcyA9IHJlYWN0aXZlKHt9KVxuICAgICAgXG4gICAgICBjb25zdCByZWFkb25seUl0ZW1zID0gcmVhZG9ubHkoaXRlbXMpXG4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0 IHtcbiAgICAgICAgICBcdHJldHVybiByZWFkb25seUl0ZW1zLmdldChpZClcbiAgICAgICAgICAgIC8vIHJldHVybiByZWFkb25seUl0ZW1zLnZhbHVlW2lkXVxuICAgICAgICAgIFx0Ly8gcmV0dXJuIHJlYWRvbmx5SXRlbXNbaWRdXG5cdCAgICAgICAgfSkgXHRcbiAgICAgIH0pXG5cbiAgICAgIHdhdGNoRWZmZWN0KCgpID0 IHtcbiAgICAgICAgY29uc29sZS5sb2coJ3dhdGNoRWZmZWN0IGl0ZW1zUmVzb2x2ZWRCeUlkcycsIGl0ZW1zUmVzb2x2ZWRCeUlkcy52YWx1ZSlcbiAgICAgIH0pXG4gICAgICBcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGlkcyxcbiAgICAgICAgYWRkSWRzLFxuICAgICAgICBpdGVtcyxcbiAgICAgICAgYWRkSXRlbXMsXG4gICAgICAgIGl0ZW1zUmVzb2x2ZWRCeUlkcyxcbiAgICAgIH1cbiAgICB9XG4gIH0pXG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuXHQ8ZGl2PlxuICAgIDxidXR0b24gQGNsaWNrPVwiYWRkSWRzXCI XG4gICAgICBBZGQgaWRzXG4gICAgPC9idXR0b24 XG4gICAgXG4gICAgPGJ1dHRvbiBAY2xpY2s9XCJhZGRJdGVtc1wiPlxuICAgICAgQWRkIGl0ZW1zXG4gICAgPC9idXR0b24 XG4gIDwvZGl2PlxuICBcbiAgPGRpdj5cbiAgICBpZHM6IHt7IGlkcyB9fVxuICA8L2Rpdj5cbiAgXG4gIDxkaXY XG4gICAgaXRlbXM6IHt7IGl0ZW1zIH19XG4gIDwvZGl2PlxuICBcbiAgPGRpdj5cbiAgICBpdGVtc1Jlc29sdmVkQnlJZHM6IHt7IGl0ZW1zUmVzb2x2ZWRCeUlkcyB9fVxuICA8L2Rpdj5cbjwvdGVtcGxhdGU In0=)
Steps to reproduce
What is expected?
After clicking
Add items
, theitemsResolvedByIds
computed effect should rerun.What is actually happening?
The computed effect does not rerun.
Versions with a
reactive
object, and an objectref
is present in the repro, but commented out.These can be used to show that the behaviour is only present in readonly reactive maps.
A fix for this issue seems to have been attempted before in #1772, but as far as I can see, it wasn't completely successful.
The text was updated successfully, but these errors were encountered: