Trigger collection update when document gets updated (renamed)

This commit is contained in:
Jori Lallo
2017-09-12 19:54:22 -07:00
parent ce5b6e6ac8
commit e40d9cebda
2 changed files with 14 additions and 1 deletions

View File

@ -160,6 +160,11 @@ class Document extends BaseModel {
this.updateData(res.data);
this.hasPendingChanges = false;
});
this.emit('collections.update', {
id: this.collection.id,
collection: this.collection,
});
} catch (e) {
this.errors.add('Document failed saving');
} finally {