Skip to content

[Feature Request] Allow sorting notes by multiple attributes #6829

@BeatLink

Description

@BeatLink

Describe feature

It would be great if trilium could support sorting notes by multiple attributes.

From the UI side, this could be achieved by setting sorted to multiple comma separated values (e.g. #sorted=priority,dueDate,title)

For implementation, the code could sort each note by the leftmost attribute, and if those attributes are equal then it uses the further right attributes for sorting.

So in the example above, first the code sorts by priority. If the priority is the same then it sorts by dueDate. If the due dates are the same, then it sorts by title.

This may also need an expansion to the #sortDirection attribute to be comma separated as well, (e.g. #sortDirection="asc,desc,desc") where each sort direction would correspond to the sorted attribute.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    UIIssues related to user-interface/front-end

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions