Topic: Material Select - Handling word wrap

cdenby pro asked 5 years ago


The material select behaves very well in the drop-down part when handling long text - the long selectable item is wrapped in the drop-down. However, on a limited width screen, then placeholder is still input type="text" and therefore can't display long content well.

Has anyone experimented with a better solution? Putting a label in place and hiding the input? Or is there a better way to get what I'm after here?

Here is the select: <span class="hoverable" onClick="$('.mdb-select').materialSelect();" style="cursor: pointer;"
                      >(Click to Activate)</span>
<div style="width: 200px;">
  <select class="mdb-select">
    <option>--Select Me--</option>
    <option value="1" selected>Here is a selected really long line of content</option>
    <option value="2">Here is the first unselected really long line of content</option>
    <option value="3">Here is the second unselected really long line of content</option>
    <option value="4">Here is the third unselected really long line of content</option>
    <option value="5">Here is the fourth unselected really long line of content</option>
    <option value="6">Here is the fifth unselected really long line of content</option>

  </select>
</div>

Snippet


Piotr Glejzer staff commented 5 years ago

I don't have a temporary solution for this now, I added this to our list to do to look into more in the future. Sorry about that. Have a nice day.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.6
  • Device: iPhone
  • Browser: Safari
  • OS: ios 12.2
  • Provided sample code: No
  • Provided link: Yes