Skip to content

[TextField] Better isolate static textarea behavior to dynamic one#21995

Merged
oliviertassinari merged 3 commits intomui:nextfrom
AxartInc:patch-1
Jul 31, 2020
Merged

[TextField] Better isolate static textarea behavior to dynamic one#21995
oliviertassinari merged 3 commits intomui:nextfrom
AxartInc:patch-1

Conversation

@AxartInc
Copy link
Contributor

@AxartInc AxartInc commented Jul 29, 2020

Breaking changes

TextField

  • Better isolate the fixed textarea height behavior to the dynamic one.
    You need to use the rowsMin prop in the following case:

    -<TextField rows={2} rowsMax={5} />
    +<TextField rowsMin={2} rowsMax={5} />

TextareaAutosize

  • Remove the rows prop, use the rowsMin prop instead.
    This change aims to clarify the behavior of the prop.

    -<TextareaAutosize rows={2} />
    +<TextareaAutosize rowsMin={2} />

Closes #21317

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #21317 around the correct direction for the problem

@oliviertassinari oliviertassinari added breaking change Introduces changes that are not backward compatible. scope: text field Changes related to the text field. labels Jul 29, 2020
@oliviertassinari oliviertassinari changed the title Add rowsMin type [TextField] Add minRows prop Jul 29, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Jul 29, 2020

Details of bundle changes

Generated by 🚫 dangerJS against fc103ed

@oliviertassinari
Copy link
Member

@AxartInc What do you think about the proposed direction? Is this something you would like to work on? :)

@AxartInc
Copy link
Contributor Author

@AxartInc What do you think about the proposed direction? Is this something you would like to work on? :)

@oliviertassinari
Why not, though I must confess I haven't quite figured out how to do that. I'm really starting, it's only been 2 weeks since I've been using react, typescript etc. for the first time.

@oliviertassinari oliviertassinari changed the title [TextField] Add minRows prop [TextField] Add rowsMin prop Jul 31, 2020
@oliviertassinari oliviertassinari changed the title [TextField] Add rowsMin prop [TextField] Better isolate static textarea behavior to dynamic one Jul 31, 2020
@oliviertassinari oliviertassinari merged commit 3ec5e6e into mui:next Jul 31, 2020
@oliviertassinari
Copy link
Member

@AxartInc I have continued the pull request, thanks for giving it a try :)

@eps1lon eps1lon added this to the v5 milestone Aug 4, 2020
@eps1lon eps1lon mentioned this pull request Aug 5, 2020
42 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible. scope: text field Changes related to the text field.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TextField] Improve multiline behavior

4 participants