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

fix: argument must be checked against true #255

parent dbbac393
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>disable false for message-state-button does not work #255</title>
<script src="./255.mjs" type="module"></script>
</head>
<body>
<h1>disable false for message-state-button does not work #255</h1>
<p>user aborted</p>
<ul>
<li><a href="https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/255">Issue #255</a></li>
<li><a href="/">Back to overview</a></li>
</ul>
<main>
<monster-message-state-button id="message-state-button" disabled="false">test</monster-message-state-button>
</main>
</body>
</html>
/**
* @file development/issues/open/255.mjs
* @url https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/255
* @description disable false for message-state-button does not work
* @issue 255
*/
import "../../../source/components/style/property.pcss";
import "../../../source/components/style/link.pcss";
import "../../../source/components/style/color.pcss";
import "../../../source/components/style/theme.pcss";
import "../../../source/components/style/normalize.pcss";
import "../../../source/components/style/typography.pcss";
import "../../../source/components/form/message-state-button.mjs";
document.addEventListener("DOMContentLoaded", () => {
const button = document.querySelector("monster-message-state-button");
console.log(button);
setTimeout(() => {
button.setOption("features.disableButton", true);
console.log(button.getOption("features.disableButton"));
setTimeout(() => {
button.setOption("features.disableButton", false);
console.log(button.getOption("features.disableButton"));
}, 4000);
}, 4000);
});
\ No newline at end of file
......@@ -366,7 +366,7 @@ function getTemplate() {
<div data-monster-role="control" part="control">
<monster-state-button exportparts="button:button-button,control:button-control"
data-monster-attributes="data-monster-option-classes-button path:classes.button, disabled path:features.disableButton"
data-monster-attributes="data-monster-option-classes-button path:classes.button, disabled path:features.disableButton | if:true"
part="button"
name="button"
data-monster-role="button">
......
......@@ -374,7 +374,7 @@ function toggleValues() {
/**
* @private
*/
*/F
function validateAndSetValue() {
const value = this.getOption("value");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment