all files / modules/ auto-complete.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   39× 39× 39× 39×   48× 48×     44×   38× 37× 37×     39×   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 AutoComplete = (function () {
        function AutoComplete(parent) {
            this.compObj = undefined;
            this.parent = parent;
            this.parent.atcModule = this;
            this.base = new base_module_1.Base(this.parent, this);
        }
        AutoComplete.prototype.render = function (e) {
            this.compObj = new ej2_dropdowns_1.AutoComplete(this.parent.model);
            this.compObj.appendTo(e.target);
        };
        AutoComplete.prototype.showPopup = function () {
            this.compObj.focusIn();
            this.compObj.showPopup();
        };
        AutoComplete.prototype.focus = function () {
            this.compObj.element.focus();
        };
        AutoComplete.prototype.updateValue = function (e) {
            if (this.compObj && e.type === 'AutoComplete') {
                this.parent.setProperties({ value: this.compObj.value }, true);
                this.parent.extendModelValue(this.compObj.value);
            }
        };
        AutoComplete.prototype.destroy = function () {
            this.base.destroy();
        };
        AutoComplete.prototype.getModuleName = function () {
            return 'auto-complete';
        };
        return AutoComplete;
    }());
    exports.AutoComplete = AutoComplete;
});