Tweaks for seamless save of new doc

This commit is contained in:
Tom Moor
2017-12-28 12:35:59 +00:00
parent 721374e08d
commit 2d70618f01
3 changed files with 63 additions and 63 deletions

View File

@@ -203,6 +203,9 @@ class DocumentsStore extends BaseStore {
this.on('documents.delete', (data: { id: string }) => {
this.remove(data.id);
});
this.on('documents.create', (data: Document) => {
this.add(new Document(data));
});
autorunAsync('DocumentsStore.persists', () => {
if (this.data.size) {