When you have focus on the dropdown then click away from the dropdown to collapse the list, it auto selects an item even thou you did not click that item.
Example of this behavior can be found here: http://semantic-ui.com/modules/dropdown.html#/definition
I would expect a click away to just close the dropdown, not select something.
Seems to only effect the search, since the non-search multiselect works fine.
Thanks
Love SemanticUI!
This is actually controlled by the setting forceSelection which you can disable. It is enabled by default and will force auto selection if the element loses the focus, probably for people who use tab to autocomplete and move forward to the next field.
I'd say the default should be set to false for forceSelection. It feels very unnatural that something is selected when you want to exit the dropdown ...
I'm seeing this issue even if an item is selected. Let's say you open the dropdown, select an item, then click away. You'll end up getting two items selected, the one you chose and then the next available item.
$('.ui.dropdown').dropdown({
forceSelection: false
});
did not work for me, option is getting selected always when I try to exit the control
wow, thanks for the response guys. so this option did work for me. My code:
$scope.find('.dropdown').dropdown({
placeholder: false,
forceSelection: false
});
$scope could be a page handle, modal handle etc...depending what I'm doing.
I agree in that it should be set to false as the default.
Thanks!
You can disable forceSelection by default with:
$.fn.dropdown.settings.forceSelection = false;
I think im going to change this behavior because its driving everyone crazy.
Life saver, Thanks!
Fixed in 2.2.8
I also met
Most helpful comment
I'd say the default should be set to
falseforforceSelection. It feels very unnatural that something is selected when you want to exit the dropdown ...