semantic-ui 多选下拉列表在点击列表外时选择项目

semantic-ui multiselect dropdown selects item when clicking out of the list

我注意到在 semantic-ui 网站上,每当您单击多选下拉列表然后单击其中的内容时,即使您没有单击它,它也会选择突出显示的元素。

示例位于:http://semantic-ui.com/modules/dropdown.html#tagging-and-user-additions

如果您单击下拉菜单(标题为 Multilpe 的下拉菜单)然后退出,它会选择 'Angular' 作为选项。

有没有办法避免这种情况?

Semantic-UI 2.2.8/2.2.9.

已修复此错误

我在公司项目中发现了这个错误,我可以通过将 forceSelection 设置为 false 来避免这种行为。

更清楚地修改下拉组件本身的此行为:

$('.ui.dropdown').dropdown({forceSelection: false});

或在全球范围内使用

$.fn.dropdown.settings.forceSelection = false;