You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
I got an issue, when my component is loaded the TextareaAutosize component starts out as 'display: none', and when the user clicks on a button only then does the TextareaAutosize appear (with 'display:;' to unset the previous CSS display property)
The issue:
This works fine, except when the user has already inputted some multi-line text, the textarea is hidden again, and then when it is shown again the height is suddenly the minimum one-line height.
How can I make TextareaAutosize recalculate the proper height when it reappears with tall text contents already in it?
The text was updated successfully, but these errors were encountered:
Not sure if this will help, but I found the following worked for a similar issue I ran into.
Issue: My controlled TextareaAutoresize component with an initial value was inside a React Bootstrap Collapse where the overall container begins with a style of display:none. When the Collapse is “opened” and the display changes to block, the textarea displayed at the minimum height instead of the height sized for the initial value.
Fix / Workaround: Added async={ true } to my TextareaAutoresize component. Added a conditional to only render the TextareaAutoresize component if the Collapse was “open”. Both were required as simply doing one or the other resulted in the originally described behavior.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey!
I got an issue, when my component is loaded the TextareaAutosize component starts out as 'display: none', and when the user clicks on a button only then does the TextareaAutosize appear (with 'display:;' to unset the previous CSS display property)
The issue:
This works fine, except when the user has already inputted some multi-line text, the textarea is hidden again, and then when it is shown again the height is suddenly the minimum one-line height.
How can I make TextareaAutosize recalculate the proper height when it reappears with tall text contents already in it?
The text was updated successfully, but these errors were encountered: