Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Feature Request (future): Add hook for individual sorting function (comparator function) #12

Open
Moonbase59 opened this issue May 22, 2021 · 0 comments
Assignees
Labels

Comments

@Moonbase59
Copy link

Moonbase59 commented May 22, 2021

Thanks for this really helpful plugin! Please try to get it into the official list to install via "Community Plugins" …

For a future version, especially for use with the Dataview plugin, please consider adding a hook that would allow adding an individual Javascript sort comparator function per column (as usual, returning -1, 0, or 1).

If this could be added in a Dataview JS (dataviewjs) code block, it would allow sorting on columns that have otherwise "unsortable" content, like dates individually formatted using moment.js.

If building dataviewjs queries, it can be expected that the user knows about JS and has the internal data available that would allow writing a comparator function.

See also: https://forum.obsidian.md/t/dataviewjs-snippet-showcase/17847/16?u=moonbase59

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants