MCPcopy Create free account
hub / github.com/code100x/cms / adjustTextareaHeight

Function adjustTextareaHeight

src/components/comment/CommentInputForm.tsx:52–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51 // Function to adjust the height of the textarea
52 const adjustTextareaHeight = () => {
53 if (textareaRef.current) {
54 textareaRef.current.style.height = 'auto'; // Reset the height
55 textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`; // Set the height based on scroll height
56 }
57 };
58
59 useEffect(() => {
60 if (!isCommentValid() || isLoading) {

Callers 1

CommentInputFormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected