ensure textbox updates the value

This commit is contained in:
pngwn 2022-03-23 10:34:39 +00:00
parent b7d2125323
commit 4f772dc8d9
2 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,7 @@
export let placeholder: string;
export let mode: "static" | "dynamic";
$: console.log(value);
</script>
{#if mode === "static"}

View File

@ -19,6 +19,7 @@
});
function handle_change(event: CustomInputEvent) {
value = event.target.value;
dispatch("change", event?.target?.value);
}
@ -29,8 +30,8 @@
}
}
const debounced_handle_change = debounce(handle_change, 500);
const debounced_handle_keypress = debounce(handle_keypress, 500);
const debounced_handle_change = debounce(handle_change, 300);
const debounced_handle_keypress = debounce(handle_keypress, 300);
</script>
{#if lines > 1}