From 83ef4cae9e51b69ba72bb66bb0702fa6afbc486d Mon Sep 17 00:00:00 2001 From: MattMo Date: Fri, 10 Nov 2023 12:11:47 -0800 Subject: [PATCH] Removed the options extension because a more powerful version is now baked into Ignite Html directly. --- ignite-html-select.js | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/ignite-html-select.js b/ignite-html-select.js index 6853bcd..09803cb 100644 --- a/ignite-html-select.js +++ b/ignite-html-select.js @@ -535,40 +535,5 @@ IgniteTemplate.prototype.countries = function(placeholder = null) { } } - return this.innerHTML(html); -} - -/** - * Generates a series of options from an array of values, or an object of key values pairs. - * @param {Array|Object} options An array of strings or list of key value pairs to create options from. - * @param {*} placeholder The placeholder option, it's value will be 0, if set this text will be shown. - * @returns {IgniteTemplate} This ignite template. - * @example IgniteTemplate.prototype.options([{"Custom value": "Display value"}, "value2", "value3"]); - * @example IgniteTemplate.prototype.options({"value1": "A", "value2": "B"}); - */ - IgniteTemplate.prototype.options = function(options, placeholder = null) { - //Generate html and populate the template with it. - var html = ''; - - if (placeholder) { - html += ``; - } - - if (Array.isArray(options)) { - for (var i = 0; i < options.length; i++) { - if (options[i] instanceof Object) { - var keys = Object.keys(options[i]); - html += ``; - } else { - html += ``; - } - } - } else { - var keys = Object.keys(options); - for (var i = 0; i < keys.length; i++) { - html += ``; - } - } - return this.innerHTML(html); } \ No newline at end of file