igniteui-react-grids
Version:
Ignite UI React grid components.
104 lines (103 loc) • 3.17 kB
JavaScript
import { IgrColumn } from "./igr-column";
import { PinColumnCancellableEventArgsDetail as PinColumnCancellableEventArgsDetail_internal } from "./PinColumnCancellableEventArgsDetail";
import { ensureBool } from "igniteui-react-core";
/**
* The event arguments before a column's pin state is changed.
* `insertAtIndex`specifies at which index in the pinned/unpinned area the column is inserted.
* Can be changed in the `columnPin` event.
* `isPinned` returns the actual pin state of the column. When pinning/unpinning is successful,
* the value of `isPinned` will change accordingly when read in the "-ing" and "-ed" event.
*/
export class IgrPinColumnCancellableEventArgsDetail {
createImplementation() {
return new PinColumnCancellableEventArgsDetail_internal();
}
get nativeElement() {
return this._implementation.nativeElement;
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
onImplementationCreated() {
}
constructor() {
this.mounted = false;
this._implementation = this.createImplementation();
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
_provideImplementation(i) {
this._implementation = i;
this._implementation.externalObject = this;
this.onImplementationCreated();
if (this._initializeAdapters) {
this._initializeAdapters();
}
}
get column() {
const r = this.i.a;
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.a = null : this.i.a = 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.f;
}
set insertAtIndex(v) {
this.i.f = +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.e;
}
set isPinned(v) {
this.i.e = ensureBool(v);
}
/**
* Provides the ability to cancel the event.
*/
get cancel() {
return this.i.d;
}
set cancel(v) {
this.i.d = ensureBool(v);
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
if (this.column && this.column.name && this.column.name == name) {
return this.column;
}
return null;
}
setNativeElement(element) {
this.i.setNativeElement(element);
}
}