@luftborn/custom-elements 2.5.8 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/demo/index.min.js CHANGED
@@ -3346,7 +3346,8 @@ var DropDownListElement = /** @class */ (function (_super) {
3346
3346
  __extends(DropDownListElement, _super);
3347
3347
  function DropDownListElement() {
3348
3348
  var _this = _super.call(this) || this;
3349
- _this.optionTemplate = "\n <option value='{0}'>\n {1}\n </option>";
3349
+ _this.optionTemplate = "\n\t\t<option value='{0}'>\n\t\t{1}\n\t\t</option>";
3350
+ _this.placeholderOptionTemplate = "\n\t\t<option selected disabled>\n\t\t{0}\n\t\t</option>";
3350
3351
  return _this;
3351
3352
  }
3352
3353
  Object.defineProperty(DropDownListElement.prototype, "value", {
@@ -3383,6 +3384,10 @@ var DropDownListElement = /** @class */ (function (_super) {
3383
3384
  DropDownListElement.prototype.addOptions = function () {
3384
3385
  var _this = this;
3385
3386
  this.select.innerHTML = "";
3387
+ if (this.placeholder) {
3388
+ this.select.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(this.placeholderOptionTemplate, this.placeholder));
3389
+ }
3390
+ ;
3386
3391
  this.options.forEach(function (element, index) {
3387
3392
  _this.select.insertAdjacentHTML('beforeend', StringUtil_1.StringUtil.StringFormat(_this.optionTemplate, element, element));
3388
3393
  });