similar notes is getting updated automatically after the title change

This commit is contained in:
zadam
2019-09-03 21:31:39 +02:00
parent 9404e27cba
commit 2e05cb1764
10 changed files with 53 additions and 30 deletions

View File

@@ -81,11 +81,13 @@ class AttributesWidget extends StandardWidget {
}
}
syncDataReceived(syncData) {
if (syncData.find(sd => sd.entityName === 'attributes' && sd.noteId === this.ctx.note.noteId)) {
// no need to invalidate attributes since the Attribute class listens to this as well
// (and is guaranteed to run first)
this.doRenderBody();
eventReceived(name, data) {
if (name === 'syncData') {
if (data.find(sd => sd.entityName === 'attributes' && sd.noteId === this.ctx.note.noteId)) {
// no need to invalidate attributes since the Attribute class listens to this as well
// (and is guaranteed to run first)
this.doRenderBody();
}
}
}
}