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

Binding issue #30

Open
sevab opened this issue Dec 3, 2018 · 2 comments
Open

Binding issue #30

sevab opened this issue Dec 3, 2018 · 2 comments

Comments

@sevab
Copy link

sevab commented Dec 3, 2018

I have a route where model is bound to a query param (in my case a category_id). As I change the underlying category model within this route, elsewhere fails to send fresh data (category.title in this case) to the underlying component navbar-title, and the content remains stale. The data does update in the next render, but with the previous model's state instead of the current.

Updates in the next render with last model's data
{{to-elsewhere named='nav-title' send=(component 'navbar-title' title=category.title}}

Updates immediately with current data
{{log category.title}}

@sevab
Copy link
Author

sevab commented Dec 3, 2018

Possibly related to emberjs/ember.js#13061

From the comments there tried passing same data via hash as a workaround and it works, but adds a lot of unnecessary complications. A previously simple {{#from-elsewhere name='nav-title'}}, becomes

{{#from-elsewhere name='nav-title' as |c|}}
  {{#if c}}
    {{navbar-title title=c.title}}
  {{/if}}
{{/from-elsewhere}}

@ef4
Copy link
Owner

ef4 commented Dec 21, 2018

Thanks for reporting this, I haven't had a chance to dig in but it does seem like a real bug.

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

2 participants