fix(ui): Selector initial attribute value

feat/type-attributes
Tomáš Mládek 2023-01-08 13:58:32 +01:00
parent 59c34dba5e
commit 85d200fba6
1 changed files with 5 additions and 4 deletions

View File

@ -20,12 +20,13 @@
export let placeholder = "";
export let disabled = false;
let inputValue = "";
if (type == "attribute") {
inputValue = attribute || "";
} else {
inputValue = String(value?.c || "");
value = {
c: attribute,
t: "String",
};
}
let inputValue = String(value?.c || "");
$: if (value === undefined) inputValue = undefined;
function onInput(ev: CustomEvent<string>) {