fomantic / Fomantic-UI

Fomantic-UI is the official community fork of Semantic-UI
https://fomantic-ui.com
MIT License
3.57k stars 334 forks source link

[Dropdown] Duplicates with "allowAdditions" are not filtered #1850

Open Amerlander opened 3 years ago

Amerlander commented 3 years ago

Bug Report

Creating a Dropdown wit allowAdditions and set values twice will only filter the first dublicate select option, but neither it will filter predefined values nor duplicate user inputs when they have different case: https://jsfiddle.net/6q9szhdm/4/

Steps to reproduce

Create a dropdown with user input and set dublicates in the val;ue tag or in the options list.

$('.ui.dropdown').dropdown({
  allowAdditions: true,
  ignoreCase: true,
});

Expected result

All dublicates should only be shown once. Predefined letters should not show up in the selection menu.

Actual result

All duplicates except the first duplicate are showing up twice. They are in the selection menu while they are already selected by the preset. The case is not ignored and user can input items twice when he changes

Testcase

https://jsfiddle.net/6q9szhdm/4/

Screenshot (if possible)

image

Version

2.7.7

Amerlander commented 3 years ago

Beside a fix of that bug I would love to have an option like allowDublicates, which should allow multiple selections and user inputs with the same Value.

lubber-de commented 2 years ago

ignoreCase is now fixed in upcoming 2.9.0 see https://jsfiddle.net/lubber/3onmej0z/