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

InputTextarea with auto resize isn't sized correctly when initially populated with a long string #1999

Closed
j-smith-1574 opened this issue Apr 30, 2021 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@j-smith-1574
Copy link

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Current behavior
InputTextarea doesn't automatically resize when textarea is initially populated with a long single line string. When the textarea is populated this way, the contents overflow once a user inputs some whitespace into the string, the textarea will then resize to the expected size.

Expected behavior
The textarea should be sized to the correct size initially without the user having to add input first.

Minimal reproduction of the problem with instructions
render the component:

<InputTextarea
            rows={5}
            cols={60}
            autoResize={true}
            value={this.state.longString}
            onChange={e => this.setState({longString: e.target.value})}/>
  • React version:
    16.14.0

  • PrimeReact version:
    5.0.0 but this still doesn't work in 6.3.0

  • Browser:

  • all

  • Language:

  • all

@mertsincan mertsincan self-assigned this May 5, 2021
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label May 5, 2021
@mertsincan mertsincan added this to the 6.3.2 milestone May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants