jeudi 30 juillet 2015

Ember-data resets queryParam to default value

In my model, I have a queryParam status which is set to refreshModel true in my route.

queryParams: {
    status: {
        refreshModel: true
    }
}

In my controller, this param is set to 'opened' by default :

App.ConversationsController = Ember.ArrayController.extend({
    status: 'opened'
});

Everytime I set this param to something else, for example 'all', Ember-data resets it to 'opened' and makes two calls instead of one to my model hook, and this behavior has been observed with breakpoints on my model hook (I don't know where it resets), one with param:opened and one with param:all. I even put an observer on it and it effectively does that.

Note that I already searched my code and there is litteraly nowhere where I set this param back to original value.

Any hints?




Aucun commentaire:

Enregistrer un commentaire