question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

div.mdc-select seems to have a static width of only 9px for some reason. For this reason, it does not show the currently selected value (or the hintText).

I can inspect the element and set the width higher and see the span correctly, but when I interact the the dropdown it sets it back to 9px.

screen shot 2017-10-20 at 2 03 39 pm

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
garrett-thompsoncommented, Oct 23, 2017

It seems like selectedIndex coming from props was causing an issue. Once I changed that from an Immutable.js structure to a plain JS object & added style={{ minWidth: '100px' }} to the Select element, everything is working as expected.

Thanks a ton @prateekbh !!

0reactions
prateekbhcommented, Oct 23, 2017

so here are two things: a.) looks like you cannot instantiate an empty Select and that might be the case since you are passing it through props, please check. I’ll also try asking this to mdc-web team b.) for the width, I guess you can specify the min-width or a fixed width.

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - How can change width of dropdown list? - Stack Overflow
This code works on IE 6 but not in Mozilla Firefox (latest version). Can anybody please tell me how I can decrease the...
Read more >
Controlling the width of SELECT lists - BlooBerry
The default width of a SELECT form control is usually dependent on the width of the widest OPTION item in the list; the...
Read more >
How To Set Width Of Select Option In HTML - TalkersCode.com
Step By Step Guide On How To Set Width Of Select Option In HTML :- · First, we write <! · Secondly, the...
Read more >
How to Expand Select Box to its Default Width on Focus Using ...
Answer: Use the CSS :focus pseudo-class. By default the size of the <select> element is depend on the size of the largest <option>...
Read more >
How to adjust the width of a HTML combobox (Drop down box ...
How to adjust the width of a HTML combobox (Drop down box or Select box) · You can use external CSS (Cascading Style...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found