Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

How to 'force' auto-height calculation? #147

@ZeroByter

Description

@ZeroByter

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions