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

beexclusiv free asked 5 years 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


Piotr Glejzer staff answered 5 years 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


hesteras priority answered 5 years 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 free commented 5 years 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



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

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