igniteui-react-grids
Version:
Ignite UI React grid components.
74 lines (73 loc) • 1.87 kB
JavaScript
import { ColumnWidth as ColumnWidth_internal } from "./ColumnWidth";
import { ensureBool } from "igniteui-react-core";
/**
* Represents a width of a column.
*/
export class IgrColumnWidth {
createImplementation() {
return new ColumnWidth_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();
}
}
/**
* Gets or sets whether to use star sizing for the column's width
*/
get isStarSized() {
return this.i.c;
}
set isStarSized(v) {
this.i.c = ensureBool(v);
}
/**
* Gets or sets the fixed width or the proportional width of the column, depending on whether this width is a star width.
*/
get value() {
return this.i.f;
}
set value(v) {
this.i.f = +v;
}
/**
* Gets or sets a minimum width to use when star sizing.
*/
get minimumWidth() {
return this.i.e;
}
set minimumWidth(v) {
this.i.e = +v;
}
findByName(name) {
if (this.findEphemera) {
if (name && name.indexOf("@@e:") == 0) {
return this.findEphemera(name);
}
}
return null;
}
}