question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No possibility to reset sorting on custom sort

See original GitHub issue

What package(s) are you using?

  • [ 9.62.1 ] carbon-components
  • [ 6.61.1 ] carbon-components-react

Summary

Relevant information

We are using custom sort function, the third click on header should result in unsort operation but I don’t see any way to catch that event and update the table. As per my understanding custom sorting function will be called on first and second click on the header, but on the third click, it won’t call the custom sort function. So how can we update the table to an unsorted state?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
joshblackcommented, Aug 31, 2020

I believe that it should preserve the original order on the third click, here is a quick codesandbox that copies over the default sort behavior to demonstrate. Let me know if you instead would like to change the ordering from the default ordering passed to component and I can help out there, too. Hope this helps!

1reaction
emyarodcommented, Aug 28, 2020

you’re right that when no sort is applied, the sorting function will not be called. instead, the initial row order is returned and stored in the table’s state.rowIds

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create a custom sort when a regular sort won't do in ...
From the Order dropdown, choose Custom Sort, which will open a new dialog, where you can create the custom sort (list). In the...
Read more >
Excel Custom Sort list does not start over with new higher level
The level for Semester does not reset when the Year changes. The Semester column is the only one that has a custom sort...
Read more >
Reset Sorting on Columns - Flexmonster
However, there is no option to reset/remove the sorting. ... We suggest using the following workaround in order to clear sorting after ...
Read more >
Pivot Table Sorting Fixes & Tips - Contextures
Applying the Custom Sort Order · Refresh the pivot table. · If the field which has items from a custom list is set...
Read more >
apex - Custom sort on product related list on opportunity in ...
By default, sorting happens by the SortOrder field. For the standard UI and the standard functionality, we found no way to change it....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found