material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Case insensitive default sort

Open r-s-sandbox opened this issue 6 years ago • 5 comments

Is your feature request related to a problem? Please describe. https://codesandbox.io/s/material-demo-0i09t In the codesandbox example, default sorting is case sensitive on the name column so ahmet appears at bottom rather than top. It would be ideal to make default sorting configurable through a prop.

Describe the solution you'd like A boolean prop to enable/disable case sensitive default sort

Describe alternatives you've considered I considered custom sort but that requires user interaction once table is rendered. I would like the column pre-sorted upon render. I got it to work with default sorting after introducing toUpperCase() in the else block of sort function in data-manager.js

r-s-sandbox avatar Jan 07 '20 09:01 r-s-sandbox

Hi, please do you plan to add this feature in the near future ?

thepetas avatar May 26 '20 16:05 thepetas

+1

fridaystreet avatar Jul 30 '20 03:07 fridaystreet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Oct 28 '20 04:10 stale[bot]

Easily solved through a customSort function, but would be nice to have an option for case insensitivity.

jeffsupancic avatar Nov 07 '20 00:11 jeffsupancic

Yeah we've solved it through custom sort function, but I guess what most would expect or believe to be the standard/default wouldn't be capitalised sorting. Rather than having to boiler plate every column / table with a custom sort function.

I don't think I've ever seen a table sort that even does capitalised sort, let alone is the default.

But hey, it's not my library so who am I to judge

On Sat, 7 Nov 2020, 8:39 am Jeff Supancic, [email protected] wrote:

Easily solved through a customSort function, but would be nice to have an option for case insensitivity.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mbrn/material-table/issues/1497#issuecomment-723360568, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOGPS7Q6UNOOA4HHTAPYHDSOSJMVANCNFSM4KDVTKLQ .

fridaystreet avatar Nov 07 '20 03:11 fridaystreet