Open nagchanda opened 6 years ago
This is a bit old, but in case someone else might find it helpful.
You can add the following line to set the sortBy and sortOder:
component.ts:
ngOnIt() {
this.getData();
this.mfDataTable.setSort(sortBy, sortOrder);
}
component.html:
<table [mfData]="datasets | dataFilter: filterQuery" #mf="mfDataTable">
Can we please have sortby and sortorder back as inputs.
I have been using angular2-datatable but it is not supported by angular 5. I found this component is forked from it, but missing functionality to accept default sortby and sortorder.