diff --git a/development/issues/closed/280.html b/development/issues/closed/280.html index 963756d0e6460c54f151c73ca38465975050d81a..ee5b07807f01afc69b860f41bed3705f1c3c7fe7 100644 --- a/development/issues/closed/280.html +++ b/development/issues/closed/280.html @@ -15,7 +15,9 @@ </ul> <main> - <monster-issue-280 id="i280"> </monster-issue-280> + <monster-issue-280 id="i280" + disabled="disabled" + > </monster-issue-280> </main> diff --git a/development/issues/closed/280.mjs b/development/issues/closed/280.mjs index c95f8f2b3f61c1d35f9cb390397c50fe0b0c9b5f..12c480c57cbe7646d8a1c1e21e761a33e73dd5ec 100644 --- a/development/issues/closed/280.mjs +++ b/development/issues/closed/280.mjs @@ -38,6 +38,8 @@ setTimeout(() => { const select = document.getElementById("i280") // console.log(select); + //select.setOption("disabled", true); + select.setOption("test.value", ["826", "752"]); select.getSelect().setOption('mapping.labelTemplate', '${name} (${alpha-2})') diff --git a/source/dom/customelement.mjs b/source/dom/customelement.mjs index 2ef0794eecbb74a35e8e78d7c5fe0a932b7d4c2a..960e1f4e1cdc8aa409124751cd8167c09378c6d3 100644 --- a/source/dom/customelement.mjs +++ b/source/dom/customelement.mjs @@ -1031,6 +1031,13 @@ function getOptionsFromScriptTag() { * @return {object} */ function getOptionsFromAttributes() { + + if(this.hasAttribute(ATTRIBUTE_DISABLED) && this.getAttribute(ATTRIBUTE_DISABLED) !== null) { + this.setOption(ATTRIBUTE_DISABLED, true); + } else { + this.setOption(ATTRIBUTE_DISABLED, undefined); + } + if (this.hasAttribute(ATTRIBUTE_OPTIONS)) { try { return parseOptionsJSON.call(this, this.getAttribute(ATTRIBUTE_OPTIONS));