Is it possible to use a flag icon in a select option with te


Topic: Is it possible to use a flag icon in a select option with text

jimscottjr pro premium asked 12 months ago

Expected behavior

I would like to view a flag icon along with text in a select drop down option

Actual behavior

Flag icons do not show in a select drop down option

Resources (screenshots, code snippets etc.)

Something like this:

<option value='+1' selected ><i class='us flag'></i> US (+1)</option>

Mateusz Łubianka staff answered 12 months ago

Hi @jimscottjr,

You can use icons in Select in this way:

<option value="1" data-fas="star">Option 1</option>

But unfortunately it will not work with flags.

Best,


belu pro answered 5 months ago

Would be great, if it worked. I guess, that dropdowns for language or country selection are a very common thing.

Best,


Marcin Luczak staff commented 5 months ago

Hello belu,

Unfortunately, this is not supported yet, but as long as it seems valuable functionality to have, I created an appropriate feature request. Thank you for your question.

Regards, Marcin


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: jQuery
  • MDB Version: 4.15.0
  • Device: Macbook Pro
  • Browser: both Safari and Chrome
  • OS: macOS ctalina 10.15.2
  • Provided sample code: No
  • Provided link: No
Tags