jeudi 13 octobre 2016

Nested Route, Updated Record Gets Reordered

seeing some strange behavior, totally stumped.

i have a nested route, so “route1.show.route2.show”. Upon hitting route1.show, a list of items are loaded - and clicking any item loads the nested route for that item.

What I’m seeing is that clicking any item correctly loads the nested route, but the original list of items is reordered, so that the clicked item is now last in the list.

The first route’s model hook isn’t being called (because i’m using the resource in the link-to, not the resource.id)

but the nested route is reloading the resource, with more fields added. why would reloading this one item cause ember data to change the order of the association in the parent route?

Nested route model hook:

model(params) {
  return this.get('store').findRecord('resource', params.resource_id);
}




Aucun commentaire:

Enregistrer un commentaire