From af8ab08272f361da4ca6e5f89e11936f5ad1d8ae Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sun, 12 Jan 2025 20:05:18 +0100 Subject: [PATCH] chore: update doc --- development/issues/{open => closed}/280.html | 2 +- development/issues/{open => closed}/280.mjs | 38 ++++++++++---------- source/components/form/select.mjs | 2 ++ 3 files changed, 23 insertions(+), 19 deletions(-) rename development/issues/{open => closed}/280.html (91%) rename development/issues/{open => closed}/280.mjs (83%) diff --git a/development/issues/open/280.html b/development/issues/closed/280.html similarity index 91% rename from development/issues/open/280.html rename to development/issues/closed/280.html index fcd58bd12..963756d0e 100644 --- a/development/issues/open/280.html +++ b/development/issues/closed/280.html @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>select attribute=\"value\" from datasource doesn´t work #280</title> - <script src="./280.mjs" type="module"></script> + <script src="280.mjs" type="module"></script> </head> <body> <h1>select attribute="value" from datasource doesn't work #280</h1> diff --git a/development/issues/open/280.mjs b/development/issues/closed/280.mjs similarity index 83% rename from development/issues/open/280.mjs rename to development/issues/closed/280.mjs index 87f2f504e..c95f8f2b3 100644 --- a/development/issues/open/280.mjs +++ b/development/issues/closed/280.mjs @@ -1,9 +1,9 @@ /** -* @file development/issues/open/280.mjs -* @url https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/280 -* @description select attribute=\"value\" from datasource doesn´t work -* @issue 280 -*/ + * @file development/issues/open/280.mjs + * @url https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/280 + * @description select attribute=\"value\" from datasource doesn´t work + * @issue 280 + */ import "../../../source/components/style/property.pcss"; import "../../../source/components/style/link.pcss"; @@ -36,28 +36,30 @@ const dataset = [ setTimeout(() => { const select = document.getElementById("i280") - console.log(select); - - select.setOption("test.value", ["826","752"]); + // console.log(select); - //if(true) return + select.setOption("test.value", ["826", "752"]); - //document.getElementById("i280").setOption("test.value", "a,b,c"); - - -// the label template is a string that will be used to generate the label for each option select.getSelect().setOption('mapping.labelTemplate', '${name} (${alpha-2})') // the value template is a string that will be used to generate the value for each option select.getSelect().setOption('mapping.valueTemplate', '${country-code}') - select.getSelect().importOptions(dataset); + //if(true) return + + //document.getElementById("i280").setOption("test.value", "a,b,c"); + setTimeout(() => { +// the label template is a string that will be used to generate the label for each option + + select.getSelect().importOptions(dataset); + + }, 1000); //select.setOption("test.value", ["826","752"]); -},1000); +}, 1000); class Issue280 extends CustomElement { @@ -72,8 +74,8 @@ class Issue280 extends CustomElement { main: getTemplate(), }, - test : { - value : ["826"] + test: { + value: ["826"] } }); @@ -100,7 +102,7 @@ function getTemplate() { <div data-monster-role="control" part="control"> <monster-select data-monster-attributes="value path:test.value" data-monster-option-type="checkbox"> - + </monster-select> diff --git a/source/components/form/select.mjs b/source/components/form/select.mjs index 6a34cf5f5..0c2e9b857 100644 --- a/source/components/form/select.mjs +++ b/source/components/form/select.mjs @@ -267,6 +267,8 @@ const FILTER_POSITION_INLINE = "inline"; /** * A select control that can be used to select one or more options from a list. * + * @issue @issue https://localhost.alvine.dev:8444/development/issues/closed/280.html + * * @fragments /fragments/components/form/select/ * * @example /examples/components/form/select-with-options Select with options -- GitLab