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

Modifying items of an extended array does not trigger re-computation #11759

Closed
scottbedard opened this issue Aug 30, 2024 · 0 comments · Fixed by #11760
Closed

Modifying items of an extended array does not trigger re-computation #11759

scottbedard opened this issue Aug 30, 2024 · 0 comments · Fixed by #11760
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. 🐞 bug Something isn't working scope: reactivity

Comments

@scottbedard
Copy link
Contributor

scottbedard commented Aug 30, 2024

Vue version

3.5.0-rc.1

Link to minimal reproduction

https://play.vuejs.org/#eNp9kl1r2zAUhv/KQTd2IHM2ut0YO11XerFdbGPbpWA48knqVJaEPtIO4/++Iwm3KZSAjdD5ePXo1ZnYjTHVKSCrWeOEHYwHhz6YLVfDaLT1MIHQowke+zVY7IQfTggz7K0eoaDOgiuuhOycg1stJVKBVoBPHlXv4Mba7h9MXAHsB9WXY+fFPdpVDgEp+mAVuGDQVq8qYn7mij6S18oRmO88QvtMUSYNfz+og6tB4eMZQDnBXusaigJmkor/IrPrLIkslyrLFbTbrF1lrcyhd8eYoKUiJWjbFgpqLVYk1WyyV+QSbTyORlI77QAaY3E7TWRbklzH4+p05vU1FEp74gqqJyyY52YTq6MINe6C9+TcZyEH8dBydglplZkyEWfpZIDUCSMmuU3Wo1SzOSNka+YdGbEfDtXRaUUPn2zkLDoySLQ/TDTQcVYvj8RZJ6V+/JZi3gZcL3F6KfHwRvzonmKMs58WHdoTcvac8509oM/pu9/faVLOkqPug6TqC8lf6LQMkTGXfSE7CfusLtF+TeNL5v1xd3EY3XKpCJqGK9VzRjN8e+HqL7hX1cdlKMnFvye0UZMMvKo+Ve/fWVF9YPN/u1QbwA==

Steps to reproduce

  1. Create a class that extends Array, and add a method that calls super
  2. Create a computed value that uses that method to find an item
  3. Change a property on the item

What is expected?

The computed value should update

What is actually happening?

Computed value does not re-evaluate

System Info

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 233.67 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
    npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
    pnpm: 9.7.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 128.0.6613.113
    Firefox Nightly: 129.0a1
    Safari: 17.4.1

Any additional comments?

This was working in beta.1, and stopped working in beta.2. This failure is different from versions >= beta.3 though. In beta.2, the source value does not update, so it's unclear if the computed property would have re-evaluated.

This regression is likely related to fixes from earlier tickets,
#11570
#11573
#11628 ← this was very similar, but it accessed item by index instead of method

@jh-leong jh-leong added 🐞 bug Something isn't working scope: reactivity labels Aug 31, 2024
@edison1105 edison1105 added the ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. label Aug 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
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
Projects
None yet
3 participants