Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

@Moonbase59
Copy link

@Moonbase59 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 join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants