Skip to content

TextField minimum rows can now be sensibly set.#693

Merged
hai-cea merged 3 commits intomui:masterfrom
super-cache-money:master
Jun 3, 2015
Merged

TextField minimum rows can now be sensibly set.#693
hai-cea merged 3 commits intomui:masterfrom
super-cache-money:master

Conversation

@super-cache-money
Copy link
Copy Markdown
Contributor

By passing a number of rows as a prop to TextField, the minimum number of rows occupied by a Text Field may now be set:

<TextField floatingLabelText="Detailed Feedback" rows={3} multiLine={true}/>

This is useful, since the greater space occupied by a field in a text form encourages users to type more into it.

Observe the effect of this change on the above example:

Before:
Before

After:
after

@hai-cea
Copy link
Copy Markdown
Member

hai-cea commented Jun 2, 2015

Thanks @super-cache-money

Can you add propType validation here please?
super-cache-money@014ed3d#diff-c91c01d2a8e9011a6b5d239d05c48039L27

Also, do we need add the rows prop here to prevent it from being passed down to the input element?
super-cache-money@014ed3d#diff-c91c01d2a8e9011a6b5d239d05c48039L197

@super-cache-money
Copy link
Copy Markdown
Contributor Author

Cool - done.

hai-cea added a commit that referenced this pull request Jun 3, 2015
TextField minimum rows can now be sensibly set.
@hai-cea hai-cea merged commit 451c0eb into mui:master Jun 3, 2015
@hai-cea
Copy link
Copy Markdown
Member

hai-cea commented Jun 3, 2015

Thanks @super-cache-money !

@hlolli
Copy link
Copy Markdown

hlolli commented Aug 24, 2016

I am now having this problem when the multiline text field is nested in a list. As soon as I type one character it expands. If the nested list is initially open, this does not happen. Using version 0.15.4.

@zannager zannager added the scope: text field Changes related to the text field. label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: text field Changes related to the text field.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants