Topic: MDBDataTable sort case insensitive

pal.wagner free asked 4 years ago


The current sorting on MDBDataTable is case sensitive but in few fields we would perform case insensitive sorting? Is it possible to do that somewhow?


Piotr Glejzer staff commented 4 years ago

There is only possible to sort with case sensitive.

Elek Balla free answered 4 years ago


I was able to create a hack/solution for case sensitive sorting.

Small example

Basically in the searchvalue property, I've set everything to be lower case. Whenever you defined this property in your tag, the sort is using that value, instead of the text you actually see (which contains upper and lower case letters).

Note: Also important to define the sortRows array.

Hope this is helpful.

Piotr Glejzer staff commented 4 years ago

thanks for your example.

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

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.26.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No