UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

122 lines (121 loc) 4.19 kB
import { IgcDataGridColumnComponent } from "./igc-data-grid-column-component"; import { ComboBoxColumn } from "./ComboBoxColumn"; import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * A combobox column. */ export let IgcComboBoxColumnComponent = /*@__PURE__*/ (() => { class IgcComboBoxColumnComponent extends IgcDataGridColumnComponent { createImplementation() { return new ComboBoxColumn(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (this.updateContentChildren) { this.updateContentChildren(); } else if (this._updateAdapters) { this._updateAdapters(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent == null) { let names = getAllPropertyNames(IgcComboBoxColumnComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent = names; } return IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent; } static register() { if (!IgcComboBoxColumnComponent._isElementRegistered) { IgcComboBoxColumnComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcComboBoxColumnComponent.htmlTagName, IgcComboBoxColumnComponent); } } /** * Gets the actual data source that is being used by the combo. If a collection was provided for the combobox data, an implicit LocalDataSource is created, and this is available via this property. */ get actualDataSource() { return this.i.n5; } set actualDataSource(v) { this.i.n5 = v; } /** * Gets or sets the ComboBox data source. */ get dataSource() { return this.i.n6; } set dataSource(v) { this.i.n6 = v; } /** * Gets or sets the ComboBox text field. */ get textField() { return this.i.oa; } set textField(v) { this.i.oa = v; } /** * Gets or sets the ComboBox value field. */ get valueField() { return this.i.ob; } set valueField(v) { this.i.ob = v; } /** * Gets or sets the ComboBox value field. */ get valueMultiField() { return this.i.n3; } set valueMultiField(v) { if (v && !Array.isArray(v) && typeof (v) == "string") { const re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.n3 = v; } } IgcComboBoxColumnComponent._observedAttributesIgcComboBoxColumnComponent = null; IgcComboBoxColumnComponent.htmlTagName = "igc-combo-box-column"; IgcComboBoxColumnComponent._isElementRegistered = false; return IgcComboBoxColumnComponent; })();