Opt group with data-icon, is that possible?

5 replies · opened Nov 6, 2016

JjuanleNov 6, 2016

Hello, I am trying to get a drop-down list including optgroup with icons,

example

<optgroup data-icon="icon-glass" label="Catering">

The display does not reflect the icon, I have tried including the icon as <i class='icon-line-sun'></i> inside the label, but also does not work.

Any advice?

Thanks a lot
Juan

SSemicolon WebSTAFFNov 6, 2016

Hello,

We Apologize about the Inconveniences! Can you please let us know which component are you planning to use so that we can help you further with this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

JjuanleNov 6, 2016

Thanks for the fast reply. I am in the context of component-select-box.html

Using the option "Select Multiple Values"

Thanks
Juan

SSemicolon WebSTAFFNov 7, 2016

Hello,

Apologies about the Delays! We have tried working on this for a while and unfortunately this is currently not supported with the optgroup at the moment. This can be added to the Options itself using this example: https://select2.github.io/examples.html#templating .

Thanks for your Patience. Do let us know if we can help you with anything else or if you find any further issues with Canvas.

JjuanleNov 7, 2016

Thanks a lot, no worries I understand the template has some limitations. Still it is great.

Thanks
Juan

SSemicolon WebSTAFFNov 8, 2016

Hello,

Thank You so much for your Continued Patience! Actually, data-icon for the optgroup is definitely supported but only for the Select Pickers: component-select-picker.html and here is the Documentation regarding this: https://silviomoreto.github.io/bootstrap-select/examples/#customize-options .

However, it is not supported by the Select2 Plugin (component-select-box.html).

Hope this Helps!

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard