mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(search): don't render note list if no results
This commit is contained in:
parent
5b99c8f595
commit
01f6368f95
@ -55,10 +55,16 @@ export default class SearchResultWidget extends NoteContextAwareWidget {
|
||||
}
|
||||
|
||||
async refreshWithNote(note: FNote) {
|
||||
const noResults = note.getChildNoteIds().length === 0 && !!note.searchResultsLoaded;
|
||||
|
||||
this.$content.empty();
|
||||
this.$noResults.toggle(note.getChildNoteIds().length === 0 && !!note.searchResultsLoaded);
|
||||
this.$noResults.toggle(noResults);
|
||||
this.$notExecutedYet.toggle(!note.searchResultsLoaded);
|
||||
|
||||
if (noResults || !note.searchResultsLoaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
const noteListRenderer = new NoteListRenderer(this.$content, note, note.getChildNoteIds(), true);
|
||||
await noteListRenderer.renderList();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user