March 2019
Intermediate to advanced
534 pages
14h 52m
English
To help prevent scenarios where a dynamically-sized multiline text field might cause problems, you can specify the number of rows used by a multiline text field. Here's an example of how to use the rows property:
<TextField multiline rows={5} label="Address" value={multiline} onChange={e => setMultiline(e.target.value)}/>
Now, the text field will have exactly five rows:

If the user enters more than five lines of text, a vertical scrollbar will be displayed—the height of the text doesn't change and can't impact the layout of other surrounding components. You can impose the same type of height restriction on the TextField component ...
Read now
Unlock full access