@syncfusion/ej2-grids
Version:
Feature-rich JavaScript datagrid (datatable) control with built-in support for editing, filtering, grouping, paging, sorting, and exporting to Excel.
29 lines (28 loc) • 863 B
JavaScript
import { createEditElement } from '../base/util';
/**
* `DropDownEditCell` is used to handle dropdown cell type editing.
*
* @hidden
*/
var EditCellBase = /** @class */ (function () {
function EditCellBase(parent) {
this.parent = parent;
}
EditCellBase.prototype.create = function (args) {
return createEditElement(this.parent, args.column, 'e-field', { type: 'text' });
};
EditCellBase.prototype.read = function (element) {
return element.ej2_instances[0].value;
};
EditCellBase.prototype.destroy = function () {
if (this.obj && !this.obj.isDestroyed) {
if (this.removeEventHandler) {
this.removeEventHandler();
}
this.obj.destroy();
this.obj.element.remove();
}
};
return EditCellBase;
}());
export { EditCellBase };