UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

50 lines (49 loc) 1.7 kB
import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { IgrTemplateHeaderCellUpdatingEventArgs } from "./igr-template-header-cell-updating-event-args"; import { IgrHeader } from "./igr-header"; import { TemplateHeader } from "./TemplateHeader"; /** * A type of header with customizable content. */ export class IgrTemplateHeader extends IgrHeader { createImplementation() { return new TemplateHeader(); } /** * @hidden */ get i() { return this._implementation; } constructor(props) { super(props); this._cellUpdating = null; this._cellUpdating_wrapped = null; } /** * Called when the header cell content is being created or updated. */ get cellUpdating() { return this._cellUpdating; } set cellUpdating(ev) { if (this._cellUpdating_wrapped !== null) { this.i.cellUpdating = delegateRemove(this.i.cellUpdating, this._cellUpdating_wrapped); this._cellUpdating_wrapped = null; this._cellUpdating = null; } this._cellUpdating = ev; this._cellUpdating_wrapped = (o, e) => { let outerArgs = new IgrTemplateHeaderCellUpdatingEventArgs(); outerArgs._provideImplementation(e); if (this.beforeCellUpdating) { this.beforeCellUpdating(this, outerArgs); } if (this._cellUpdating) { this._cellUpdating(this, outerArgs); } }; this.i.cellUpdating = delegateCombine(this.i.cellUpdating, this._cellUpdating_wrapped); ; } }