mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
fix collapsing/expanding the book note
This commit is contained in:
@@ -66,12 +66,17 @@ export default class NoteListWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
async refresh() {
|
||||
this.$content.empty();
|
||||
this.shownNoteId = null;
|
||||
|
||||
await super.refresh();
|
||||
}
|
||||
|
||||
async refreshNoteListEvent({noteId}) {
|
||||
if (this.isNote(noteId)) {
|
||||
await this.renderNoteList(this.note);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We have this event so that we evaluate intersection only after note detail is loaded.
|
||||
* If it's evaluated before note detail then it's clearly intersected (visible) although after note detail load
|
||||
@@ -94,7 +99,7 @@ export default class NoteListWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
entitiesReloadedEvent({loadResults}) {
|
||||
if (loadResults.getAttributes().find(attr => attr.noteId === this.noteId && attr.name === 'viewType')) {
|
||||
if (loadResults.getAttributes().find(attr => attr.noteId === this.noteId && ['viewType', 'expanded'].includes(attr.name))) {
|
||||
this.shownNoteId = null; // force render
|
||||
|
||||
this.checkRenderStatus();
|
||||
|
||||
Reference in New Issue
Block a user