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

select is not updating when using with mut on ember 3.20.4 #1398

Closed
Kilowhisky opened this issue Sep 14, 2020 · 4 comments
Closed

select is not updating when using with mut on ember 3.20.4 #1398

Kilowhisky opened this issue Sep 14, 2020 · 4 comments

Comments

@Kilowhisky
Copy link

Kilowhisky commented Sep 14, 2020

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.

ezgif-7-4a53d80dc774

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}}&nbsp;
  {{/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

emberjs/ember.js#19101
emberjs/ember.js#19111
emberjs/data#7281

@wuarmin
Copy link

wuarmin commented Oct 5, 2020

@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?

Peek 2020-10-05 13-06

It works with Ember 3.21.x.

@cibernox
Copy link
Owner

cibernox commented Oct 7, 2020

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?

@wuarmin
Copy link

wuarmin commented Oct 8, 2020

@cibernox of course, that sounds fair. I hope there's a patch for 3.20, because it's a LTS version.

Best regards

@benreckas
Copy link

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.

@mkszepp mkszepp closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants