No text truncation for multi select dropdown
See original GitHub issueDescription
I’m using the multiselect dropdown and I have quite a few options, close to 11 and most of the times I will have at least 6 selected. When that happens, the text goes under the dropdown arrow and it looks bad.
Repro Steps
Add the following dropdown into a page:
<div class="input-field col s4">
<select multiple>
<option value="" disabled selected>Protocol</option>
<option value="1">HTTP/HTML</option>
<option value="2">Web services/SOAP</option>
<option value="3">Ajax Truclient</option>
<option value="4">Siebel Web</option>
<option value="5">RDP</option>
<option value="6">Oracle NCA</option>
<option value="7">Citrix ICA</option>
<option value="8">Winsocket</option>
<option value="9">SAP GUI</option>
<option value="10">SAP WEB</option>
<option value="11">WAP</option>
</select>
<label>Protocol</label>
</div>
Heres a link to a codepen: http://codepen.io/anon/pen/PpjrWe
Screenshots / Codepen
Issue:
Fix 1: (Expand the text box dynamically like in selectivity.js) Homepage link
Fix 2: (Show the count of the number of items selected) Link to demo
It would be great if you could give the user an option of using either modes.
Thank you!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Widening multi-select labels to avoid text truncation? - Streamlit
Hi guys, I'd like to widen multi-select labels to avoid text truncation, is this possible? Please check out my post here: New Component: ......
Read more >Select2: how to make list not wrap in dropdown and multiple ...
... Select2 dropdown list default behavior would adjust width according to selection and mess up my frame, I'd like it not to wrap...
Read more >Multi-select drop down selector element values text wrap or ...
In MicroStrategy 10.x, when creating a Multi Select Drop Down, there is a known issue where element values will be cut off or...
Read more >Wrap text in a cell - Microsoft Support
Microsoft Excel can wrap text so it appears on multiple lines in a cell. ... In a worksheet, select the cells that you...
Read more >text-overflow - CSS: Cascading Style Sheets - MDN Web Docs
The default for this property. This keyword value will truncate the text at the limit of the content area, therefore the truncation can...
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
One possible fix
or
See http://caniuse.com/#feat=text-overflow and notice also the problems
I found a fix. If you add the class
truncate
to the select element, it turns into a different style which puts a white background to the triangle. It might have some weird effects though, you have to includeoptions
in the parameters forM.FormSelect.init
otherwise it has another drop down appear above it.The fix mentioned earlier using text-overflow didn’t work for me testing on chrome.