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