Topic: MDBDatatable - sort components

Piotrek Nero free asked 5 years ago


Expected behavior The column is sorted according to the components searchValue props.

Actual behavior No sorting components columns at all if column is in sortRows props MDBDatatable.

Resources (screenshots, code snippets etc.) Problematic code fragment (checkField function in handleSort)

return direction === 'desc' ? aField < bField : aField > bField;

This checkField function is not compatible with JS compareFunction documentation


Konrad Stępień staff answered 5 years ago


Hi @Piotrek Nero,

In the next release, I will update DataTable and fixed some bugs.

Among others, I will fix the sorting system in the data table.

From our GitHub, a user suggested for us how to fix this problem and his suggestion working very well.

Please wait for the update and check our changelog on this site on Monday.

Best regards, Konrad.



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.19.2
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes