Skip to content
Snippets Groups Projects
Verified Commit afdef441 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

feat: Disable monster issue 280 and update handling for attribute

Summary of changes
- Updated the HTML for monster issue 280 to reflect its disabled state, ensuring that it informs users of its current unavailability.
- Modified the JavaScript logic in the relevant files to support the new disabled attribute, enabling better control over component state.

Details:
- In `280.html`, the `monster-issue-280` component is now given a `disabled` attribute which will visually signal its inactive status to users.
- In `280.mjs`, the commented-out selection of, "disabled," was left as a reminder for possible future enhancements and to signal where the cut-off option merging should lead.
- The `customelement.mjs` file's function has been enhanced to check for the `disabled` attribute, thus enabling dynamic updates to the component options based on its state. This ensures the component behaves consistently depending on its attributes.
parent 3a832607
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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})')
......
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment