Topic: Datatable Case Insensitive Sorting

kalmservices premium asked 1 year ago

Expected behavior When you have one value that begins with a lowercase letter, and you sort on a column, that lowercase value should still be properly alphabetized with the rest of the values.

Actual behavior The lowercase letters come in at the bottom of the sorting, giving you all capital letters first, then all lowercase letters, in alphabetical order. So A-Z will appear before a-z, which defeats the purpose of alphabetical sorting. I created a basic snippet showing exactly this behavior. This is something that people have been asking about for years, and it's a simple enough fix to implement, just by doing null/undefined checks and calling String.prototype.toLowerCase or toUpperCase on the values being sorted. Every time we update our project I have to go in and manually do this, but it should be default functionality.

Resources (screenshots, code snippets etc.)

You can see the lowercase values here, and sort on the Name column and see that the fields starting with lowercase letters come after all fields starting with uppercase letters.

Such things must first be resolved in MDBStandard. I will ask the standard team whether we consider this a bug and probably add this topic to our task list.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Premium
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: Computer
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: Yes