I was using backbone.stickit so far for cases when the model should be updated immediately when the view's field was updated. But for several cases I found that it's more appropriate to update the model only when submit is pressed.
Stickit supports events
so the events triggering override of the model can be defined. These events, however, are only input field specific.
Is it possible to trigger the override of the model for view events (like clicked:submit
) ?
Thanks for advice.
I found a solution using custom event saveClicked
triggered on input fields. In the bindings I set the field to stick to this custom event. For the form when save was clicked for every input field (also select, textarea,..) the saveClicked
event is triggered.