unsorting column when datatable initialized with ordering
unsorting column when datatable initialized with ordering
fansili2013
Posts: 1Questions: 1Answers: 0
When "ordering"
is set to true
, the sorted column of DataTable will be either descending or increasing. First click will change the column to increasing and if clicked again, it is changed back to descending. If it is possible to unsort this column and simply sort by the original order of the input data? e.g. increasing -> descending -> unsorted.
This discussion has been closed.
Answers
Hi @fansili2013 ,
You can disable initial ordering with
order
-order: []
.This should give you what you want,
Cheers,
Colin