ember-power-select
ember-power-select copied to clipboard
select is not updating when using with mut on ember 3.20.4
Since updating to ember 3.20.4 the select list no longer updates when changes to the model occur if used against an ember data hasMany.

Here is the basic code
<h1>Re-render Bug</h1>
<p>
Since <code>3.20.4</code> the UI will no re-render if you update the entire model of an array proxy.
This can be verified by changing the ember source version to <code>3.19.0</code>
</p>
<h4>This will re-render properly</h4>
<div>People Selected: {{model.group.people.length}}</div>
<div>People:
{{#each model.group.people as |person|}}
{{person.name}}
{{/each}}
</div>
<h4>This will <strong>NOT</strong> re-render</h4>
<PowerSelectMultiple
@options={{model.people}}
@selected={{model.group.people}}
@onChange={{fn (mut model.group.people)}} as |person| >
{{person.name}}
</PowerSelectMultiple>
Here is a demo repo showing the issue: https://github.com/Kilowhisky/ember-array-proxy-bug
This may be related to
https://github.com/emberjs/ember.js/issues/19101 https://github.com/emberjs/ember.js/pull/19111 https://github.com/emberjs/data/issues/7281
@Kilowhisky @cibernox I observed a similar issue with Ember 3.20.5. I spend a lot of time for investigation. What can we do to spare other users experiencing this annoying issue?

It works with Ember 3.21.x.
I missed this when it was originally reported. If it does work with 3.21 I can only assume it's a bug in Ember or Ember-data itself? Also, if worked before 3.20.4 and works again starting in 3.21.X, I'd rather not introduce any workaround for an ember bug that was present in only two minor patch versions.
Sounds fair?
@cibernox of course, that sounds fair. I hope there's a patch for 3.20, because it's a LTS version.
Best regards
Was experiencing this issue with Ember v 3.21.2 and Ember Data v 3.21.0. Updating to 3.22 for both fixed it in my case.