You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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}}
The text was updated successfully, but these errors were encountered:
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}}
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 componentnavbar-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}}
The text was updated successfully, but these errors were encountered: