-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Ember.js 3.20.4 no longer compensating for EmberArray implementation oversight in ED #7328
Comments
@snewcomer So I included a detailed reproduction in this issue description above that references my repo showing the bug. Is that what you mean? If not, could you please clarify what you're after? I'd be happy to write a failing unit test if that's what you mean (although I must admit I haven't got any experience doing that on this repo yet)... |
👋 I'm not seeing the repo reference in these issues... |
@snewcomer Hmmm that's interesting. I've copy/pasted it below for you: Repro
Actual Behavior Expected Behavior |
@snewcomer Yep looks good, nice work! I guess this will be closed when the PR is merged, but feel free to close it directly if you want. |
@samcic 👋 Mind trying out |
This was originally opened in emberjs/ember.js#19139, but @pzuraq asserted that it's an ED issue related to the implementation of EmberArray, which ember.js is no longer compensating for as of Ember 3.20.4, so I've reopened it here.
May be related to #7310 ,which already has a PR ready with a failing test case.
Issue copied below for reference:
🐞 Describe the Bug
If I'm tracking a model object with a
hasMany
list of items, I have a getter that uses those items to compute something else, and I clear those items, then the getter doesn't fire (but it does if I add items to the list).Here's a quick video to describe it visually:
https://recordit.co/OeEey7Edrw
I've also confirmed the issue on the latest Ember.js Beta build (3.22-beta-3).
I'm aware of various other similarly-sounding reports of issues between 3.20.3 and 3.20.4 (e.g. this one on sort, and this one which seems rather similar but is apparently fixed in 3.22-beta-3). I don't believe there's an open issue tracking this particular behavior.
🔬 Minimal Reproduction
Describe steps to reproduce. If possible, please, share a link with a minimal reproduction.
git clone https://github.com/samcic/reactivity-bug.git
cd reactivity-bug
yarn install
ember serve
😕 Actual Behavior
When the collection is cleared, the getter
itemsLength
doesn't fire and the template doesn't update.🤔 Expected Behavior
When the collection is cleared, the getter
itemsLength
should fire and the template should show the count0
.🌍 Environment
The text was updated successfully, but these errors were encountered: