igniteui-react-grids
Version:
Ignite UI React grid components.
63 lines (62 loc) • 1.93 kB
JavaScript
import { IgrColumn } from "./igr-column";
import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail";
import { ColumnMovingEventArgsDetail as ColumnMovingEventArgsDetail_internal } from "./ColumnMovingEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* Represents event arguments related to a column moving operation in a grid
*/
export class IgrColumnMovingEventArgsDetail extends IgrBaseEventArgsDetail {
createImplementation() {
return new ColumnMovingEventArgsDetail_internal();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
/**
* 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;
}
/**
* `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.h;
}
set cancel(v) {
this.i.h = 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;
}
return null;
}
}