Backbone.js - Collection keeps getting reset after fetch.success gets called -


i have existing items in collection , want call fetch different url bring in other items merged in.

for reason reset being called if use reset:false flag , think has success callback.

is there anyway disable reset event , still use success callback?

my fetch looks this:

self.collection.fetch({    url: url,    add: true,    reset: false,    success: function() {      self.render();      $('.loading').hide();    },    error: function() {       $('.loading').hide();    } }); 

i have faced problem , solved this. can try this

self.collection.fetch({    url: url,    add: true,    add: true,    remove: false,    update: true,    success: function() {      self.render();      $('.loading').hide();    },    error: function() {       $('.loading').hide();    } }); 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -

matlab - How to equate a structure array to structure array -