-
Notifications
You must be signed in to change notification settings - Fork 167
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
Comments
On a side note / tangent, it'd be great if the base |
Good catch! This is unexpected. For now, you can do the |
Just commenting to remove the response requested since it seems just an issue of priority, nothing further is needed from me. |
Hi, I am looking into updating the documentation accordingly: #3320 I am curious about your need for an infinite value. I would say, in general it is good to have a constraint by design in order to keep the page usable —letting the textarea become scrollable instead when the maximum is reached. Is there a reason why you would need to let the user stretch the field without limit? |
To clarify, I'm not saying it needs to be truly infinite, but I think a max row count of 3 by default is unnecessarily restrictive. I'd expect it to at least be like 20 or some higher value. At the same time, I also think infinite is still fine, because if someone wants to cap it at It doesn't make sense to me to support a value called |
Thanks for the extra info. I am discussing this further with the team. |
The API docs were updated to document the current behavior. Changing these default values is not something we consider because it would break the expected behavior of existing usages of the component. We consider however adding a more idiomatic way of unsetting the limit as you suggest. |
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 thePromptInput
is basically just aTextarea
that supports dynamic resizing by default.Currently if you don't pass
maxRows
, it defaults to3
, but the docs state there is no default. Is it possible to remove the default, or support passingnull
or something? I can pass in an arbitrary large value like99999999
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
The text was updated successfully, but these errors were encountered: