UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

87 lines (86 loc) 2.76 kB
import { IgrColumn } from "./igr-column"; import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail"; import { ColumnMovingEndEventArgsDetail as ColumnMovingEndEventArgsDetail_internal } from "./ColumnMovingEndEventArgsDetail"; import { ensureBool } from "igniteui-react-core"; /** * Represents event arguments related to the end of a column moving operation in a grid */ export class IgrColumnMovingEndEventArgsDetail extends IgrBaseEventArgsDetail { createImplementation() { return new ColumnMovingEndEventArgsDetail_internal(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * The source of the event represents the column that is being moved. * The `ColumnType` contains the information (the grid it belongs to, css data, settings, etc.) of the column in its properties */ get source() { const r = this.i.g; if (r == null) { return null; } if (!r.externalObject) { let e = IgrColumn._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set source(v) { v == null ? this.i.g = null : this.i.g = v.i; } /** * The target of the event represents the column, the source is being moved to. * The `ColumnType` contains the information (the grid it belongs to, css data, settings, etc.) of the column in its properties */ get target() { const r = this.i.h; if (r == null) { return null; } if (!r.externalObject) { let e = IgrColumn._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set target(v) { v == null ? this.i.h = null : this.i.h = v.i; } /** * `cancel` returns whether the event has been intercepted and stopped * If the value becomes "true", it returns/exits from the method, instantiating the interface */ get cancel() { return this.i.i; } set cancel(v) { this.i.i = ensureBool(v); } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.source && this.source.name && this.source.name == name) { return this.source; } if (this.target && this.target.name && this.target.name == name) { return this.target; } return null; } }