ng2-smart-table
Version:
Angular Smart Table
37 lines • 1.21 kB
JavaScript
var Cell = (function () {
function Cell(value, row, column, dataSet) {
this.value = value;
this.row = row;
this.column = column;
this.dataSet = dataSet;
this.newValue = '';
this.newValue = value;
}
Cell.prototype.getColumn = function () {
return this.column;
};
Cell.prototype.getRow = function () {
return this.row;
};
Cell.prototype.getValue = function () {
var valid = this.column.getValuePrepareFunction() instanceof Function;
var prepare = valid ? this.column.getValuePrepareFunction() : Cell.PREPARE;
return prepare.call(null, this.value, this.row.getData());
};
Cell.prototype.setValue = function (value) {
this.newValue = value;
};
Cell.prototype.getId = function () {
return this.getColumn().id;
};
Cell.prototype.getTitle = function () {
return this.getColumn().title;
};
Cell.prototype.isEditable = function () {
return this.getColumn().isEditable;
};
return Cell;
}());
export { Cell };
Cell.PREPARE = function (value) { return value; };
//# sourceMappingURL=cell.js.map