Bootstrap-select: default icon is of glyphicon type

Created on 22 Dec 2013  路  5Comments  路  Source: snapappointments/bootstrap-select

Default option icon is of glyphicon type, when i use fontAwesome class .glyphiocon does not let my icon to display properly, and I have to remove '.glyphicon' programatically.

Could you, please, remove hardcoded glyphicon class (bootstrap-select.js line 136).

Most helpful comment

Set the iconBase and tickIcon options to customize the font used. Default is glyphicon. To use FontAwesome:

$('.selectpicker').selectpicker({
    iconBase: 'fa',
    tickIcon: 'fa-check'
});

All 5 comments

Hi,

See this commit if it can help you...
valotvince/bootstrap-select@e267d592201c42762f58c585a6e1d12beb833bc6

Set the iconBase and tickIcon options to customize the font used. Default is glyphicon. To use FontAwesome:

$('.selectpicker').selectpicker({
    iconBase: 'fa',
    tickIcon: 'fa-check'
});

Is there a way to do this as a global default? I tried creating a custom default file based off "defaults-en_US.js" with iconBase and tickIcon as defaults, but it did not pick them up...

@ataft

```js
$.fn.selectpicker.Constructor.DEFAULTS.iconBase = 'fa';
$.fn.selectpicker.Constructor.DEFAULTS.tickIcon = 'fa-check';

works great, thanks!

Was this page helpful?
0 / 5 - 0 ratings