Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PromptInput defaults to maxRows of 3 even though docs state there is no default #3283

Open
2 tasks done
purplepenguin2 opened this issue Feb 11, 2025 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@purplepenguin2
Copy link

Browser

No response

Package version

3.0.895

React version

19.0.0

Description

I wanted a resize-able textarea, and since the base/normal Textarea component doesn't expose any way to dynamically check/set the height, I found the PromptInput is basically just a Textarea that supports dynamic resizing by default.

Currently if you don't pass maxRows, it defaults to 3, but the docs state there is no default. Is it possible to remove the default, or support passing null or something? I can pass in an arbitrary large value like 99999999 but it seems a bit hacky.

tl;dr - the PromptInput component should simply resize with no limit by default and only enforce limits if the props are actually set on the component.

https://cloudscape.design/components/prompt-input?tabId=api

Source code

No response

Reproduction

No response

Code of Conduct

@purplepenguin2 purplepenguin2 added the bug Something isn't working label Feb 11, 2025
@purplepenguin2
Copy link
Author

purplepenguin2 commented Feb 11, 2025

On a side note / tangent, it'd be great if the base Textarea component simply supported dynamically/reactive resizing.

@katiegeorge
Copy link
Member

Good catch! This is unexpected. For now, you can do the 9999 solution. It is perhaps "hacky", but should work for your use case.

@purplepenguin2
Copy link
Author

Just commenting to remove the response requested since it seems just an issue of priority, nothing further is needed from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants