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

Ability to unset column sorting #5428

Open
lovincyrus opened this issue Aug 9, 2024 · 2 comments · May be fixed by #5695
Open

Ability to unset column sorting #5428

lovincyrus opened this issue Aug 9, 2024 · 2 comments · May be fixed by #5695
Assignees
Labels
Type:Feature New feature request

Comments

@lovincyrus
Copy link
Contributor

It's common to have tri-states in table design: unset, ascending, descending.

Is your feature request related to a problem? Please describe.
The current pivot table allows users to toggle between ascending and descending sort orders by clicking on a column header. However, clicking a different column header resets the sort order of the previously sorted column. We should allow users to unset a column on the third successive click.

CleanShot.2024-08-09.at.12.55.40.mp4

Describe the solution you'd like
Allows users to easily toggle between ascending, descending, and unset states by simply clicking on the column header.

Additional context
Check the sorting example from Tanstack: https://tanstack.com/table/latest/docs/framework/svelte/examples/sorting

Code reference
Search for enableSortingRemoval in the codebase.

@lovincyrus lovincyrus added the Type:Feature New feature request label Aug 9, 2024
@lovincyrus
Copy link
Contributor Author

lovincyrus commented Aug 9, 2024

Is the column sorting intentionally limited to only ascending and descending options? Would you have any context? @jkhwu @djbarnwal @ericpgreen2

@jkhwu
Copy link
Contributor

jkhwu commented Aug 9, 2024

I think unsetting a column sort would be a helpful feature and I don't know of any reasons why we don't offer this already. Let's move forward with this, thanks!

@lovincyrus lovincyrus self-assigned this Aug 14, 2024
@lovincyrus lovincyrus linked a pull request Sep 13, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Feature New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants