fullWidth issue in TextField
See original GitHub issuepackages / text-field / index.js / line no. 267, 268, 269
{label && !fullWidth ? this.renderLabel() : null}
{outlined ? this.renderNotchedOutline() : null}
{!fullWidth && !textarea && !outlined ? this.renderLineRipple() : null}
if fullWidth true then label should not be null and same for the lineRipple. if fullWidth = true then everything should be same only the length of the textbox should be 100% of the parent box. please look into it… (though in material-components-web the textfield’s behaviour is identical to this lib but logically nothing should change except width) @moog16 @bonniezhou
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
TextField doesn't render when fullWidth is true - Stack Overflow
I have a React application and I am using Material react-text-field. For some reason when I mark fullWidth as true , only the...
Read more >TextField fullWidth doesn't work when parent is flex item with ...
TextField fullWidth doesn't work when parent is flex item with no explicit width #12445. component: text field.
Read more >Full-width input field - W3Schools Tryit Editor
input { width: 100%; } </style> </head> <body> <h2>A full-width input field</h2> <form> <label for="fname">First Name</label>
Read more >Input API - Material UI - MUI
Name Type Default
autoComplete string
autoFocus bool false
classes object
Read more >How to Set MUI TextField Height and Width: The 3 Best Ways
Perhaps the simplest way to set TextField width and height is to use only the sx prop. First, set width at the root...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The only clarifier I would add to this is the MDC Web Text Field demo includes two ‘fullWidth’ text fields that both preserve the label, which admittedly led to some confusion on my end.
@souvanjana, yes this is by design. MDC React is built to match MDC Web, so we wouldn’t change the logic here. I see how it can be confusing, but if you need it to be a regular text field and take the full screen width, can you use width: 100%? Like so: