You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
Fixed note order in RN
This commit is contained in:
@ -58,6 +58,15 @@ class Note extends BaseItem {
|
||||
return output;
|
||||
}
|
||||
|
||||
static sortNotes(notes, order) {
|
||||
return notes.sort((a, b) => {
|
||||
let r = -1;
|
||||
if (a[order.orderBy] < b[order.orderBy]) r = +1;
|
||||
if (order.orderByDir == 'ASC') r = -r;
|
||||
return r;
|
||||
});
|
||||
}
|
||||
|
||||
static previewFields() {
|
||||
return ['id', 'title', 'body', 'is_todo', 'todo_completed', 'parent_id', 'updated_time', 'sync_time'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user