Given data to the data table, saved its state as originalState
.
webix.storage.local.put(datatable.getState());
updated sorting to column & reverted the state to its originalState
.
var state = webix.storage.local.get("originalState");
if (state) {
datatable.setState(state);
}
Every thing is working fine(like column re-ordering, size) but the data that was sorted earlier is not being reset to its original data. Still its is showing the sorted data only. Tried refresh()
but still it is same.
There is no way to revert table back to unsorted state You can apply some saved sorting, but you can not "unsort" the table.
table.refresh() will only repaint the data in the datatable, it doesn't have any other means If you need a real data reloading from remote datasource, you need to use