widgets can now listen to sync data changes

This commit is contained in:
zadam
2019-08-06 22:39:27 +02:00
parent fcd87b3e2d
commit bfbc124e78
8 changed files with 60 additions and 9 deletions

View File

@@ -54,6 +54,14 @@ class NoteInfoWidget {
$type.text(note.type);
$mime.text(note.mime);
}
syncDataReceived(syncData) {
if (syncData.find(sd => sd.entityName === 'notes' && sd.entityId === this.ctx.note.noteId)) {
console.log("Re-rendering note info");
this.renderBody();
}
}
}
export default NoteInfoWidget;