@luftborn/custom-elements 2.6.0 → 2.6.2

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
@@ -3347,7 +3347,7 @@ var DropDownListElement = /** @class */ (function (_super) {
3347
3347
  function DropDownListElement() {
3348
3348
  var _this = _super.call(this) || this;
3349
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
+ _this.placeholderOptionTemplate = "\n\t\t<option selected disabled id=\"placeholder-option\">\n\t\t{0}\n\t\t</option>";
3351
3351
  return _this;
3352
3352
  }
3353
3353
  Object.defineProperty(DropDownListElement.prototype, "value", {
@@ -3362,7 +3362,8 @@ var DropDownListElement = /** @class */ (function (_super) {
3362
3362
  });
3363
3363
  Object.defineProperty(DropDownListElement.prototype, "valid", {
3364
3364
  get: function () {
3365
- return this.select.validity.valid;
3365
+ var placeholderOption = this.select.querySelector('#placeholder-option');
3366
+ return this.required ? this.select.validity.valid && !(placeholderOption === null || placeholderOption === void 0 ? void 0 : placeholderOption.selected) : this.select.validity.valid;
3366
3367
  },
3367
3368
  enumerable: false,
3368
3369
  configurable: true