define(["require", "exports", "@syncfusion/ej2-treegrid", "@syncfusion/ej2-grids"], function (require, exports, ej2_treegrid_1, ej2_grids_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Sort = (function () {
function Sort(gantt) {
this.parent = gantt;
ej2_treegrid_1.TreeGrid.Inject(ej2_treegrid_1.Sort);
this.parent.treeGrid.allowSorting = this.parent.allowSorting;
this.parent.treeGrid.sortSettings = ej2_grids_1.getActualProperties(this.parent.sortSettings);
this.addEventListener();
}
Sort.prototype.getModuleName = function () {
return 'sort';
};
Sort.prototype.addEventListener = function () {
this.parent.on('updateModel', this.updateModel, this);
};
Sort.prototype.removeEventListener = function () {
if (this.parent.isDestroyed) {
return;
}
this.parent.off('updateModel', this.updateModel);
};
Sort.prototype.destroy = function () {
this.removeEventListener();
};
Sort.prototype.sortColumn = function (columnName, direction, isMultiSort) {
this.parent.treeGrid.sortByColumn(columnName, direction, isMultiSort);
};
Sort.prototype.clearSorting = function () {
this.parent.treeGrid.clearSorting();
};
Sort.prototype.updateModel = function () {
this.parent.sortSettings = this.parent.treeGrid.sortSettings;
};
Sort.prototype.removeSortColumn = function (columnName) {
this.parent.treeGrid.grid.removeSortColumn(columnName);
};
return Sort;
}());
exports.Sort = Sort;
});
|