Closed mohamedfarouk closed 10 years ago
The order that the events are fired isn't guaranteed, and I could imagine a lot of variations of this that people would want. I'd recommend adding the conditions you need within your app. You could try extend()
ing Backbone.NestedModel
and overriding trigger()
.
i have noticed that nested objects change events are fired and handled first, but in some cases i needed to handle events on each level so if i have handled the most inner value change event need to stop the event in the outer levels ie if this event fire user.bind('change:name.middle.initial', function(model, newInitial){ ... });
need to have the ability to stop the subsequent events
user.bind('change', function(model, newVal){ ... }); user.bind('change:name', function(model, newName){ ... }); user.bind('change:name.middle', function(model, newMiddleName){ ... });