Select with search box doesn't support md-outline

web
mobile

Topic: Select with search box doesn't support md-outline

beexclusiv asked a year ago

Hey all,

I want to use the select with search and the material design 2 but it doesn't work.

<select id="someSelect" class="mdb-select md-form md-outline" required>
    <option value="0" disabled selected>....</option>
    <option value="1">---------</option>
    ....                        
</select><label>SomeLabel</label>
<script>
    // Material Select Initialization
    $(document).ready(function() {
    $('#someSelect').materialSelect();
     });
</script>

Is there some solution?

Best Regards


hesteras pro answered a year ago

If you're referencing the label showing behind the select element while using "md-outline", I've been adding the class "active" to all select labels. This at least moves it to the correct location while leaving the placeholder intact. Quick fix I've been using jQuery('.mdb-select').parent('div').find('label').addClass('active'); . This at least makes it easy to remove when/if it's fixed in the future.


beexclusiv commented a year ago

Hello hesteras,

thank you for answering but it doesn't work. I think it is because the lable routes to .select-wrapper+label not to .md-form.md-outline label.

Best Regards


Piotr Glejzer staff answered a year ago

Hi,
we don't have an example with material select and new outline inputs. I added this to our task to do.
Best,
Piotr


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: jQuery
  • MDB Version: 4.7.3
  • Device: ThinkPad P50
  • Browser: Chrome
  • OS: Windows 10/ Debian
  • Provided sample code: No
  • Provided link: No