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: Datatable - Missing options (sortField, sortOrder ) in the documentation ?

cdc free asked 3 years ago


I was going to ask if it's possible "to set by default that a column is ordered 'asc' or 'desc' " ?

And I found in the source code properties that are not described in the documentation (sortField, sortOrder).

I did a test and they work.

datatable/index.js => 

class Datatable {
  constructor(element, data = {}, options = {}) {
    this._element = element;
    this._options = this._getOptions(options);
    this._sortField = this._options.sortField;
    this._sortOrder = this._options.sortOrder;


TEST datatableOptions = { color: 'dark', sortField: 'name', sortOrder: 'asc', sm: true, hover: true, pagination: false, fixedHeader: true, clickableRows: true }

Is it another documentation update problem?

Best


Dawid Wajszczuk staff answered 3 years ago


Hi,

Sorry for this inconvenience and thanks for reporting this. We will add this options as soon as possible.

Keep coding,
Dawid



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 Standard
  • MDB Version: MDB5 3.5.1
  • Device: macbook pro
  • Browser: chrome
  • OS: big sur
  • Provided sample code: No
  • Provided link: No
Tags