UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

75 lines (74 loc) 2.06 kB
import { IgrRowType } from "./igr-row-type"; import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail"; import { RowDragEndEventArgsDetail as RowDragEndEventArgsDetail_internal } from "./RowDragEndEventArgsDetail"; import { ensureBool } from "igniteui-react-core"; /** * Emitted when a dragging operation is finished (when the row is dropped) */ export class IgrRowDragEndEventArgsDetail extends IgrBaseEventArgsDetail { createImplementation() { return new RowDragEndEventArgsDetail_internal(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } /** * Represents the drag directive or information associated with the drag operation */ get dragDirective() { return this.i.i; } set dragDirective(v) { this.i.i = v; } /** * Represents the information of the row that is being dragged. */ get dragData() { const r = this.i.g; if (r == null) { return null; } if (!r.externalObject) { let e = new IgrRowType(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; } set dragData(v) { v == null ? this.i.g = null : this.i.g = v.i; } /** * `animation` returns whether the event is animated */ get animation() { return this.i.h; } set animation(v) { this.i.h = ensureBool(v); } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.dragData && this.dragData.name && this.dragData.name == name) { return this.dragData; } return null; } }