Search box not appears
francogiacobbi opened this issue · comments
Hi, i'm using the last version with jquery 3.3.1 and bootstrap 3.3.7 and popper 1.14.6.
I'm having different troubles with multiselect.
The big one is that filter not running. When i type inside the box nothing appears.
Others stranger things is that numberDisplayed not running or if in template use li instead of option list items appears as buttons.
This is event with inspector:
$('#cmbMat').multiselect({
templates: {
button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>',
popupContainer: '<ul class="multiselect-container dropdown-menu with-inputType-none"></ul>',
option: '<li style="display: list-item;"></li>',
divider: '<li class="multiselect-item divider"></li>',
filter: '<li class="multiselect-item multiselect-filter"><div class="input-group"><input class="form-control multiselect-search" type="text" style="width: 100px"></div></li>',
filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default multiselect-clear-filter" type="button"><i class="glyphicon glyphicon-remove-circle"></i></button></span>',
},
nonSelectedText: 'Nessuna selezione',
numberDisplayed: 3,
nSelectedText: ' - Too many options selected!',
enableFiltering: true,
enableCaseInsensitiveFiltering : true,
includeFilterClearBtn: true,
filterPlaceholder: 'Cerca',
enableFullValueFiltering: true,
includeSelectAllOption: true,
onSelectAll: function(checked) {
alert('onSelectAll triggered: ' + (checked ? 'selected all' : 'deselected all') + '!');
},
onChange: function(element, checked) {
console.log(element);
/*if (confirm('Do you wish to change the selection?')) {
lastSelected = element.val();
}
else {
$("#cmbMatricole").multiselect('select', lastSelected);
$("#cmbMatricole").multiselect('deselect', element.val());
}*/
},
buttonText: function(options, select) {
var labels = [];
options.each(function () {
labels.push($(this).val());
});
return labels.join(' + ');
},
buttonTitle: function(options, select) {
var labels = [];
options.each(function () {
labels.push($(this).text());
});
return labels.join(' + ');
}
});