all files / modules/ combo-box.js

100% Statements 26/26
100% Branches 4/4
100% Functions 9/9
100% Lines 26/26
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38   37× 37× 37× 37×   46× 46×   42×     37×   36× 35× 35×     387×        
define(["require", "exports", "@syncfusion/ej2-dropdowns", "./base-module"], function (require, exports, ej2_dropdowns_1, base_module_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var ComboBox = (function () {
        function ComboBox(parent) {
            this.compObj = undefined;
            this.parent = parent;
            this.parent.comboBoxModule = this;
            this.base = new base_module_1.Base(this.parent, this);
        }
        ComboBox.prototype.render = function (e) {
            this.compObj = new ej2_dropdowns_1.ComboBox(this.parent.model);
            this.compObj.appendTo(e.target);
        };
        ComboBox.prototype.focus = function () {
            this.compObj.element.focus();
        };
        ComboBox.prototype.showPopup = function () {
            this.compObj.focusIn();
            this.compObj.showPopup();
        };
        ComboBox.prototype.destroy = function () {
            this.base.destroy();
        };
        ComboBox.prototype.updateValue = function (e) {
            if (this.compObj && e.type === 'ComboBox') {
                this.parent.setProperties({ value: this.compObj.value }, true);
                this.parent.extendModelValue(this.compObj.value);
            }
        };
        ComboBox.prototype.getModuleName = function () {
            return 'combo-box';
        };
        return ComboBox;
    }());
    exports.ComboBox = ComboBox;
});