Topic: Is there a way to add a prefix icon to a mdb-select dropdown menu ?
As all the fields in my form have a dedicated icon, I tried to add an icon (fontawesome svg) to the left of an mdb-select dropdown menu as it is possible using prefix for an input textfield but it doesn't work.
Here is my code:
<div class="md-form py-1">
<i class="fas fa-globe-americas text-mdgray prefix"></i>
<select class="mdb-select">
<option value="" disabled selected>Province *</option>
<option value="">Québec</option>
</select>
</div>
Thanks in advance for your help.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.0
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No
Piotr Glejzer staff commented 6 years ago
Hello,
For that moment I think is not possible to do excacly what you want. Here is a 'work around' about that but is not what you proabbly want.
https://mdbootstrap.com/snippets/jquery/piotr-glejzer/149498
Sorry about that.
Best,
Piotr