platform icon indicating copy to clipboard operation
platform copied to clipboard

Table's column sorting function cannot be canceled

Open zyz954489346 opened this issue 2 months ago • 2 comments

Once a table's columns are sorted with ->sort(), they cannot be un-sorted. Now clicking on the table header toggles ascending and descending order. The common implementation should be that clicking toggles ascending and descending, and clicking again is canceling.

zyz954489346 avatar Oct 31 '25 05:10 zyz954489346

From my experience, I’ve only seen three-click sorting in very basic implementations that didn’t really consider having a proper “reset” option. I also checked a few popular sites with sortable tables — almost none of them use three clicks, usually just two. For example, Google Console:

https://github.com/user-attachments/assets/fecd2884-01f5-4d01-9bcf-a2e3c88f6f51

Could you explain why you need three clicks here? Why can’t the user simply click on the column they’re interested in, instead of having to “reset” the sorting first?

tabuna avatar Nov 03 '25 21:11 tabuna

From my experience, I’ve only seen three-click sorting in very basic implementations that didn’t really consider having a proper “reset” option. I also checked a few popular sites with sortable tables — almost none of them use three clicks, usually just two. For example, Google Console:

2025-11-03.23.56.41.mov Could you explain why you need three clicks here? Why can’t the user simply click on the column they’re interested in, instead of having to “reset” the sorting first?

I have the following scenario, each row of data has a hierarchical relationship, Tables are sorted by default and are sorted by parent-child relationship. When users manually select column sorting, they often need to quickly find the entries that have just been added. When the operation is complete, expect to return to the initial order so that you can see the hierarchical relationship between the entries.

zyz954489346 avatar Nov 04 '25 02:11 zyz954489346