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

event 'change' triggers on 'open' and 'close' #138

Open
cristian-dan-f opened this issue Aug 25, 2023 · 0 comments
Open

event 'change' triggers on 'open' and 'close' #138

cristian-dan-f opened this issue Aug 25, 2023 · 0 comments

Comments

@cristian-dan-f
Copy link

Hi, first I must say great job and thank you. This is the first js script that works with bootstrap modal, specificaly my case under Elementor Widget. Been testing lots of other options and they all display incorrectly, sooo a big thank you.

it seems that the 'change' event triggers multiple times, because it also triggers on 'open' and 'close' events
I use latest version v4.0.3
Also i jQuery v3.7.0

This is what I do:

let ddSelect = new MsDropdown(document.getElementById("filter_suppliers"), {
   name: "filter_suppliers",
   selectedIndex: 0,
   on: {
      'change': handler_change_filter_suppliers
   }
});

The function handler_change_filter_suppliers() simply prints a message to console

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