I'm using ng2-smart-table in my angular application. Since we are dealing with massive amount of data, I implemented pagination infrastructure and used ServerDataSource instead of LocalDataSource.
Everything works fine until it comes to sorting the data, I don't know how to elegantly capture the sorting event and send to the server the sorting (by which column, asc/desc) request, and unfortunately the documentation didn't help as well.
my ng2-smart-table settings:
public settings: any = {
pager: {
display: true,
perPage: this.itemsPerPage
},
actions: "false",
sort:true,
hideSubHeader: "true",
columns: {} //will be generated dynamically by the data
};
my ng2-smart-table component:
<ng2-smart-table
class="report-table"
[settings]="settings"
[source]="serverDataSource">
</ng2-smart-table>
any one has any suggestions?
thank you