Skip to content

Conversation

@Emmaccen
Copy link

@Emmaccen Emmaccen commented Nov 20, 2025

This component was accepting minHeight/maxHeight/disableAutoResize props and doing absolutely nothing with them. Meanwhile, the parent Composer/MultimodalInput had adjustHeight() and resetHeight() functions that both just hardcoded "44px" and called it a day 🥂.

What's fixed:

  • Implemented actual autoresize logic inside PromptInputTextarea
  • Forward refs properly so parents can access textarea without fighting us
  • Actually use the min/max height props we've been accepting
  • Implement resizeOnNewLinesOnly prop (it existed but did nothing before)
  • Remove manual height manipulation from Composer - let the component handle it
  • No breaking changes - all existing props still work
  • Miscellaneous

Changes in MultimodalInput:

  • Removed adjustHeight() and resetHeight() functions
  • Removed manual ref.current.style.height manipulation
  • Component now properly uses PromptInputTextarea's built-in resize

Changes in PromptInputTextarea:

  • Added forwardRef support
  • Implemented proper autoresize with useEffect
  • Apply minHeight/maxHeight via inline styles
  • Track newline count for resizeOnNewLinesOnly optimization
  • Single resize per change (no double execution)

The textarea now grows and shrinks nicely.

This PR will be followed by a fix (New PR) addressing the scroll-to-bottom button that currently doesn't respond to the auto-resizing text area input.

PS: Thank you for all the amazing work on this project. I truly appreciate the efforts of everyone involved and I'm committed to supporting Vercel and all its projects. Your dedication makes a real difference!

Edit:
See #1322 for supplementary fixes

@vercel
Copy link

vercel bot commented Nov 20, 2025

@Emmaccen is attempting to deploy a commit to the Templates Test vtest314 Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant