Skip to content

Event Handler for Autocomplete and Click Off #93

@BerocLOD

Description

@BerocLOD

Can you include some changes that will help event handling with validation?

I added a local method to handle updates
// update method for autocomplete function update() { $(this).niceSelect("update"); }

In the create_nice_select method, I added a binding that will call that local method when the select is changed:
$select.bind("change", update);

I unbound it back up in the string method handler (so when you call the destroy method:
$select.unbind("change", update);

lastly, I added the blur functionality to the part when you close when clicking outside.
$('.nice-select').prev('select').trigger('blur');

Thanks,
Robert

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