mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
ensure textbox updates the value
This commit is contained in:
parent
b7d2125323
commit
4f772dc8d9
@ -8,6 +8,7 @@
|
||||
export let placeholder: string;
|
||||
|
||||
export let mode: "static" | "dynamic";
|
||||
$: console.log(value);
|
||||
</script>
|
||||
|
||||
{#if mode === "static"}
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user