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.

wrong max height when using maxRows and boxSizing "border-box" #86

@FrancescoCioria

Description

@FrancescoCioria

description

If the textarea has box-sizing: border-box and some padding, the max height computed to have the desired maxRows is wrong.

how to reproduce

  • <TextareaAutosize style={{ boxSizing: 'border-box', padding: 10 }} maxRows={3} />

specs

if this.props.maxRows then pass { boxSizing: 'content-box' } to the textarea by default as style.
this inline style should be overridable by this.props.style

misc

{optional: other useful info}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions