Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 28a16e1

Browse files
authored
Try to fix autogrow issue
1 parent 521d974 commit 28a16e1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/svelte-materialify/src/components/Textarea/Textarea.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@
5858
5959
function onInput() {
6060
if (!validateOnBlur) validate();
61-
if (autogrow) {
62-
textarea.style.height = 'auto';
63-
textarea.style.height = `${textarea.scrollHeight}px`;
64-
}
61+
}
62+
63+
$: if (autogrow) {
64+
textarea.style.height = 'auto';
65+
textarea.style.height = `${textarea.scrollHeight}px`;
6566
}
6667
</script>
6768

0 commit comments

Comments
 (0)