Registers and activates a sort strategy (a strategy with the same name replaces a built-in one). Requires name and getSortedNotes; otherwise ignored with a warning.
When the strategy is not the default position, the notes list is sorted by it, with separators decided by shouldRenderSeparator / getSeparatorContent.
// Sort notes by their text length, longest first instance.UI.addSortStrategy({ name:'length', getSortedNotes:notes=>notes.sort((a, b) =>b.getContents().length - a.getContents().length), });
Registers and activates a sort strategy (a strategy with the same name replaces a built-in one). Requires
nameandgetSortedNotes; otherwise ignored with a warning. When the strategy is not the defaultposition, the notes list is sorted by it, with separators decided by shouldRenderSeparator / getSeparatorContent.