Bootstrap-multiselect: Optgroup with input checkbox

Created on 1 Sep 2016  路  2Comments  路  Source: davidstutz/bootstrap-multiselect

Hi! in the lastest version I see that the optgroup options have a checkbox. Is this intended ? I was using a older version and the optgroup doesn't have it.

Older version
opt1

Lastest version
opt2

I managed to hide that input checkbox, LOC 940 in file bootstrap-multiple.js

if (this.options.enableClickableOptGroups && this.options.multiple) {
    $('a label', $li).prepend('<input type="checkbox" style="display:none" value="' + value + '"/>');
}

Adding the display: none in style. I can make a pull request if you want.

Cheers

Most helpful comment

Hi!
Sorry but I have the opposite problem. I want to show the checkbox of the optgroups father. How can I do?
Thanks

All 2 comments

The default behavior is to show the optgroups without checkbox (i.e. by default enableClickableOptGroups is disabled) - this also works in the documentation, see one of the last examples at http://davidstutz.github.io/bootstrap-multiselect/#configuration-options-multiple.

Hi!
Sorry but I have the opposite problem. I want to show the checkbox of the optgroups father. How can I do?
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeyabadar picture zeyabadar  路  5Comments

Furgas picture Furgas  路  8Comments

psyclight picture psyclight  路  4Comments

Jojoshua picture Jojoshua  路  8Comments

fitucated picture fitucated  路  6Comments