InputLabel width is scaled down to 0.75 on focus and white space is unused.
See original GitHub issue<FormControl
fullWidth
disabled={this.disableInput()}
error={this.state.commandError !== ''}
style={{margin: '6px 0'}}
>
<InputLabel style={{background: '#eee'}}>
{this.props.server.getIn(['server', 'availableCommands', this.state.command]) || 'Command'}
</InputLabel>
<Select
fullWidth
native
value={this.state.command}
onChange={this.handleChange('command')}
inputRef={(input) => this.commandInput = input}
id={'command'}
disabled={this.disableInput()}
error={this.state.commandError !== ''}
>
{commandOptions}
</Select>
</FormControl>
The current fix is some extra CSS on :focus to compensate scaled-down width, I think something like this should be added to the lib itself.
Tech | Version |
---|---|
Material-UI | v1.5.0 |
React | 16.4.2 |
browser | Version 68.0.3440.106 (Official Build) (64-bit) |
Best wishes from Trafikito 💯
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
InputLabel width is scaled down to 0.75 on focus and ... - GitHub
InputLabel width is scaled down to 0.75 on focus and white space is unused. #12553. component: text field. out of scope.
Read more >Material-UI Core TextField globally set InputLabelProps shrink
Something like this: MuiInputLabel: { outlined: { transform: 'translate(14px, -6px) scale(0.75)' ...
Read more >How to create fancy jumping text input labels - Bootcamp
It seemingly feels like the input label is jumping. ... The white space placeholder above is a trick to enable fully using CSS...
Read more >lifesuite.css | Diversified Adjustment Service, Inc.
This is an attempt to collect a debt. Any information will be used for that purpose. This communication is from a debt collector....
Read more >chrome/browser/resources/md_downloads/vulcanized.html
This code may only be used under the BSD style license found at ... -webkit-justify-content: space-between; ... width: var(--iron-icon-width, 24px);.
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
@liesislukas If you think we can find a solution that avoids #11287 and #11283 at the same time, I’m all hears.
Yep, I know. Please just use the suggested code if it fits and push an update 👍 I’m not familiar with the source code too much so I believe you will be able to push update quicker & better.
Thank you for all the work done with material UI 👍 you and your team deserves all the credit 💯 My pleasure to contribute couple cents.