igniteui-react-grids
Version:
Ignite UI React grid components.
71 lines (70 loc) • 2.2 kB
JavaScript
import { IgrColumn } from "./igr-column";
import { IgrBaseEventArgsDetail } from "./igr-base-event-args-detail";
import { PinColumnEventArgsDetail as PinColumnEventArgsDetail_internal } from "./PinColumnEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* The event arguments after a column's pin state is changed.
* `insertAtIndex`specifies at which index in the pinned/unpinned area the column was inserted.
* `isPinned` returns the actual pin state of the column after the operation completed.
*/
export class IgrPinColumnEventArgsDetail extends IgrBaseEventArgsDetail {
createImplementation() {
return new PinColumnEventArgsDetail_internal();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
get column() {
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 column(v) {
v == null ? this.i.g = null : this.i.g = v.i;
}
/**
* If pinned, specifies at which index in the pinned area the column is inserted.
* If unpinned, specifies at which index in the unpinned area the column is inserted.
*/
get insertAtIndex() {
return this.i.i;
}
set insertAtIndex(v) {
this.i.i = +v;
}
/**
* Returns the actual pin state of the column.
* If pinning/unpinning is successful, value of `isPinned` will change accordingly when read in the "-ing" and "-ed" event.
*/
get isPinned() {
return this.i.h;
}
set isPinned(v) {
this.i.h = ensureBool(v);
}
findByName(name) {
var baseResult = super.findByName(name);
if (baseResult) {
return baseResult;
}
if (this.column && this.column.name && this.column.name == name) {
return this.column;
}
return null;
}
}