Skip to content

Commit

Permalink
Fixes occasional scrollbar that appears when typing in the Textarea c…
Browse files Browse the repository at this point in the history
…omponent. (#2167)
  • Loading branch information
deepakjosp authored Apr 16, 2024
1 parent 3cdcf6e commit 8276a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Textarea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const Textarea = forwardRef(
textareaRef.current.style.minHeight = "22px";
textareaRef.current.style.height = "auto";
const scrollHeight = textareaRef.current.scrollHeight;
textareaRef.current.style.height = `${scrollHeight}px`;
textareaRef.current.style.height = `${scrollHeight + 1}px`;
}, [value]);

return (
Expand Down

0 comments on commit 8276a4a

Please sign in to comment.