-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Dropdown] Unable to attach handler to onChange or onAdd after a dropdown has been initialized #3744
Comments
any updates on this? |
This feature is a must have |
As a sidenote, this is specifically related to calling |
@jlukic is right! It doesn't work on the select element, you invoke it in the element where the dropdown was initialized. |
@jlukic But i will have to do something like this each time $('#SomeSelect').closest('.ui.dropdown').dropdown('setting', 'onAdd', function(){}); What is expected is this $('#SomeSelect').dropdown('setting', 'onAdd', function(){}); Maybe you could add this and deprecate the |
In current versions calling dropdown methods on a |
@jlukic Happy to see you back and committing :) Anything the community can do to help? Based on the direction you want the project to go...etc? |
If a dropdown has been initialized, you cannot add a handler for the onChange or onAdd events, it only works if they are added during initialization.
During init:
$('#testThings2').dropdown({ onAdd: function(addedValue){ console.log(addedValue); } });
After Init:
$('#testThings').dropdown('setting', 'onAdd', function(addedValue){console.log(addedValue)});
JSFiddle: https://jsfiddle.net/q7yg99Ld/
The text was updated successfully, but these errors were encountered: