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]: Feature Suggestion: Add a resetSorting Prop/Method for DataTable Component #18185

Open
1 task done
hristo-voynovski opened this issue Dec 2, 2024 · 1 comment

Comments

@hristo-voynovski
Copy link

The problem

Currently there is not option to reset the sorting in a Data Table other than clicking until you get to the initial state of the table on the corresponding header. Use cases where this option would be useful:

  • There is an alternative way to order items - E.g a developer has added the ability to reorder the rows in a data table by togling drag and drop. When clicking the toggle it would be useful if the sorting could reset by a method attached to the toggle. Currently if the table is sorted by one of the headers, reordering the items with a custom function does not work.
    -There is a fitler for the table. The user has disabled columns and has filtered the table based on one of the headers. The user clicks on a "reset defaults" button which removes the filtering but cannot reset the sorting at this moment.

The solution

Adding an optional hook to reset the sorting of a DataTable component.

Examples

A property similar to the one needed here is available in the Attlasian design system. The defaultSortOrder prop can be a good starting point.

Application/PAL

No response

Business priority

Low Priority = release date is not dependent on fix or not upcoming

Available extra resources

No response

Code of Conduct

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

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

No branches or pull requests

1 participant