-
-
Notifications
You must be signed in to change notification settings - Fork 711
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
Option in metadata.json to set default sort order for a table #702
Comments
I can solve #677 (The first time you click sort by ID it should show you results in reverse order) at the same time. |
I'm going to mirror the URL syntax here, so the options in
It will throw an error if you try to define both. If I add the ability to sort by multiple columns in the future (#197) I can allow a list of columns here - though I'm not sure how I would represent "sort by created asc, title desc" in that case. If you want to disable user-specified sorting you can do so using the existing |
Found a bug: if you click on a column with a default sort order applied to it you get: "Cannot use _sort and _sort_desc at the same time" |
Using new, unreleased Datasete feature: simonw/datasette#702
simonw/datasette#702 Related commit: fe9776d
Shipped in 0.39: https://datasette.readthedocs.io/en/latest/changelog.html#v0-39 |
If you access the table page without any
?_sort
or?_sort_desc
arguments it currently defaults to order by primary key - would be neat to be able to change that.The text was updated successfully, but these errors were encountered: