Skip to content

Instantly share code, notes, and snippets.

@ArnaudBuchholz
Created January 28, 2014 13:52
Show Gist options
  • Save ArnaudBuchholz/8668033 to your computer and use it in GitHub Desktop.
Save ArnaudBuchholz/8668033 to your computer and use it in GitHub Desktop.
[ExtJS] Control Ext.data.Batch start for multiple stores serialization
var batch = new Ext.data.Batch();
batch.start = function () {};
// Sync your stores
myStore.sync({
batch: batch
});
// When done
delete batch.start;
batch.start();
@ArnaudBuchholz
Copy link
Author

By setting start at the object level, you override the prototype member and make sure that the batch won't start until you want it to start.
Once done, deleting the object member restores the prototype one visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment