Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

Filtered & paged API

$
0
0

@planetexpress69 wrote:

Hi there,

i've got a tiny app up & running. Using ember-data, ember-simple-auth with oauth2 and a the ember-django-adapter. One of my routes fetches some records from from the API & displays them in a table. On top of that table sits a wall containing a bunch of switches (debounced input fields, selects) to shrink the results from my query. Changing one of those switches adds some parameters to the URL & reloads the route, issuing a new (parametereized) query to the API & displays the result. Everything works great but it is pretty annoying that reloading the route always even reloads the wall so that I lose focus on my input field...

Reloading the route on parameter's change is achieved with implementing

queryParamsDidChange: function () {
      Ember.run.once(this, this.refresh);
}

in the route's actions.

What would be the best approach to reload just the table? Must admit that I don't get the concept of nested routes and I feel pretty much in jail of "convention over configuration" when it comes to the binding between models, controllers & routes... :frowning:

Thanks in advance for helping & sorry for being stupid,

Martin

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles