lazy loading of note list

This commit is contained in:
zadam
2020-12-27 22:19:27 +01:00
parent 95760f1d28
commit 1d64129572
12 changed files with 125 additions and 124 deletions

View File

@@ -148,8 +148,12 @@ class NoteListRenderer {
/*
* We're using noteIds so that it's not necessary to load all notes at once when paging
*/
constructor(parentNote, noteIds) {
constructor($parent, parentNote, noteIds) {
this.$noteList = $(TPL);
// note list must be added to the DOM immediatelly, otherwise some functionality scripting (canvas) won't work
$parent.empty().append(this.$noteList);
this.parentNote = parentNote;
this.noteIds = noteIds;
this.page = 1;