-
-
Notifications
You must be signed in to change notification settings - Fork 335
[Dropdown] Multiple dropdown doesn't show selected label if the selected value has ampersand "&" #2782
Copy link
Copy link
Closed
Labels
type/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug
Milestone
Description
Bug Report
When creating a multiple dropdown using <select> element and the selected option's value contains ampersand, the label for the selected value doesn't show.
Expected result
Should show the label of the selected option
Actual result
Ran this code in the console
$('.ui.dropdown.sample1').dropdown('get value')and it returns the correct value
["b & c"]
Also, I've tested creating a dropdown with using <div class="ui multiple selection dropdown"> element, and it doesn't have this issue. (See Sample 3 field in the Codepen testcase)
Testcase
HTML
<div class="field">
<label>Sample 1: Using select element with ampersand</label>
<select name="values1" class="ui fluid dropdown sample1" multiple>
<option value="">Select at least one</option>
<option value="a">A</option>
<option value="b & c" selected>B & C</option>
<option value="d">D</option>
</select>
</div>Javascript
$('.ui.dropdown').dropdown();Version
2.9.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type/bugAny issue which is a bug or PR which fixes a bugAny issue which is a bug or PR which fixes a bug

