When setting values with "set selected/exactly" or clearing values with "clear", onChange gets triggered for each value that gets added/removed.
https://jsfiddle.net/dbr26njq/48/
Expected:
I would expect that setting and clearing multiple values only would trigger one onChange.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.
Can you please re-open this. Not the same thing as disabling onChange all together (https://github.com/Semantic-Org/Semantic-UI/issues/5212)
There should be a option to trigger onChange only once for multiple values with "set selected/exactly", "clear" etc.
Or has anybody managed to find a workaround for this?
One option - but it is a workaround in my eyes - would be to destroy the dropdown before you clear/add items and then reinitialize it, call "set selected" and then add the onChange handler with "settings".
$('.dropdown')
.destroy()
.dropdown('set selected', value)
.dropdown('settings', {
onChange: someFunction
});
Most helpful comment
Can you please re-open this. Not the same thing as disabling onChange all together (https://github.com/Semantic-Org/Semantic-UI/issues/5212)
There should be a option to trigger onChange only once for multiple values with "set selected/exactly", "clear" etc.
Or has anybody managed to find a workaround for this?