Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search box not appears #1253

Open
francogiacobbi opened this issue Mar 20, 2023 · 0 comments
Open

Search box not appears #1253

francogiacobbi opened this issue Mar 20, 2023 · 0 comments

Comments

@francogiacobbi
Copy link

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:

Senza titolo-2

$('#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(' + ');
}

});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant