Editor TypeScript

This commit is contained in:
Mo Bitar
2020-04-11 19:42:50 -05:00
parent 16bde8d1d4
commit 2bc3658f1a
15 changed files with 794 additions and 614 deletions

View File

@@ -140,7 +140,7 @@ export class AppState {
);
}
async setSelectedNote(note: SNNote) {
async setSelectedNote(note?: SNNote) {
const run = async () => {
const previousNote = this.selectedNote;
this.selectedNote = note;
@@ -166,6 +166,12 @@ export class AppState {
}
}
getNoteTags(note: SNNote) {
return this.application.referencesForItem(note).filter((ref) => {
return ref.content_type === note.content_type;
}) as SNTag[]
}
getSelectedTag() {
return this.selectedTag;
}