diff --git a/packages/ui/src/lib/components/Textarea/Textarea.svelte b/packages/ui/src/lib/components/Textarea/Textarea.svelte index 1ac98a25..d03c8efc 100644 --- a/packages/ui/src/lib/components/Textarea/Textarea.svelte +++ b/packages/ui/src/lib/components/Textarea/Textarea.svelte @@ -5,8 +5,6 @@ import { styleVariants } from '$lib/styles.js'; import type { TextareaProps } from '$lib/types.js'; import { cleanClass, generateId } from '$lib/utilities/internal.js'; - import { onMount } from 'svelte'; - import type { FormEventHandler } from 'svelte/elements'; import { tv } from 'tailwind-variants'; let { @@ -75,12 +73,10 @@ } }; - const onInput: FormEventHandler = (event) => { - autogrow(event.target as HTMLTextAreaElement); - restProps?.oninput?.(event); - }; - - onMount(() => autogrow(ref)); + $effect(() => { + void value; + autogrow(ref); + });
@@ -94,7 +90,6 @@