Skip to content

onSelectAll event handler parameter is undefined #1268

@TheNephalim

Description

@TheNephalim

According to the documentation, when defining the event handler for onSelectAll there should be an options parameter available.

The following is taken from my code:

const hullSelectElement = document.getElementById("mail-setting-hulls");

let options = {
    includeSelectAllOption: true,
    selectAllValue: 'multiselect-all',
    numberDisplayed: 0,
    maxHeight: 200,
    buttonClass: 'cfr-custom-select btn btn-outline-dark btn-block ',
    buttonContainer : '<div class="dropdown" />',
    enableCaseInsensitiveFiltering: true,
    includeFilterClearBtn: true
};

options.onSelectAll = function(selectedOptions) {
    console.log(arguments);
    toastr.info("On Select All hulls");
};

$(hullSelectElement).multiselect(options);

When I define the event handler and execute my code, the event handler triggers, but the options parameter is 'undefined.' I added console.log(arguments) to the event handler and it indicates the arguments length is 0.

Any assistance is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions