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

onSelectAll event handler parameter is undefined #1268

Open
TheNephalim opened this issue Jun 8, 2023 · 0 comments
Open

onSelectAll event handler parameter is undefined #1268

TheNephalim opened this issue Jun 8, 2023 · 0 comments

Comments

@TheNephalim
Copy link

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.

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