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

Using CharOrder to sort by custom alphabetical order #153

Open
ghost opened this issue Nov 28, 2018 · 3 comments
Open

Using CharOrder to sort by custom alphabetical order #153

ghost opened this issue Nov 28, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 28, 2018

I want to use TinySort as a search filter, so the search input is used for a custom sort order.

Can I use CharOrder to override default Latin sorting, or would I need to use a custom sort function to do that?

@Sjeiti Sjeiti added the question label Dec 6, 2018
@Sjeiti
Copy link
Owner

Sjeiti commented Dec 6, 2018

Have you read the readme? It has instructions and examples on how to do so: http://tinysort.sjeiti.com/#non-latin-characters

@Sjeiti Sjeiti closed this as completed Dec 6, 2018
@ghost
Copy link
Author

ghost commented Dec 6, 2018

Thank you for your answer.

The readme only mentions non Latin overrides and sorts after a given character. Could you please be so kind and show me how I could use CharOrder to sort a-z with m as an override appearing before a in the sort list.

Many thanks!

@Sjeiti
Copy link
Owner

Sjeiti commented Dec 7, 2018

My bad, I thought it was possible but I'm trying to cook up an example and it looks as though it is not possible after all (it's been a while since I looked at that part of the code).
It would be very logical to be able to just say charOrder:'ma'. I'll reopen this issue as a feature request and check how hard it will be to implement.

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

No branches or pull requests

1 participant