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

Disable sorting

Open NebeschenkoIhor opened this issue 6 years ago • 4 comments

Hi. I have a column with numbers in a string: "10, 11, 17". How to disable sorting in material-table?

Because I have a result like: 2 10, 1

NebeschenkoIhor avatar Aug 17 '20 10:08 NebeschenkoIhor

Finded solution add to column setting: customSort: () => 0, In header settings.

NebeschenkoIhor avatar Aug 17 '20 10:08 NebeschenkoIhor

You can also just add sorting: false to the column setting.

Maybe kindly close this issue as it seems to have been resolved.

Gr8tDaNe avatar Aug 23 '20 15:08 Gr8tDaNe

Glad you got your problem resolved. It looks like the sorting wasn't working because the data types of the numbers you sent into the table were actually strings, which are going to be sorted according to their unicode properties, and not their values as numbers.

zipzapp avatar Oct 02 '20 19:10 zipzapp

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 Dec 31 '20 20:12 stale[bot]