Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How to set sortField and sortOrder in dataTables populated using Ajax

Torroni pro asked 1 year ago


Expected behavior change sortField and sortOrder values when populating a dataTable using Ajax

Actual behavior sortField and sortOrder options can only be set on init (i.e. when creating a new instance), setting their values in the update method has no effect. This means that it is not possible to change the sort field or sort order when the table is populated. This would be a useful feature to simulate server-side sorting (since this feature is not available). Do I have to delete and re-create the instance every time to obtain the desired behaviour?

Resources (screenshots, code snippets etc.) https://mdbootstrap.com/snippets/standard/torroni/5254518


Grzegorz Bujański staff commented 1 year ago

At the moment yes. We'll check what's going on and try to fix it as soon as possible



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 6.2.0
  • Device: laptop
  • Browser: Google Chrome Version 112.0.5615.121 (Official Build) (64-bit)
  • OS: Windows 10 Enterprise 22H2
  • Provided sample code: No
  • Provided link: Yes