Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.12k stars 4.94k forks source link

[dropdown] Wrong placeholder, even when placeholder is false #6285

Open shadoWalker89 opened 6 years ago

shadoWalker89 commented 6 years ago

Case 1

I have the placeholder set to false and the action to hide I have an option in the dropdown the one with the text medium that has an empty value

Expected Result

The placeholder should be Table size as i did put in the .text span

Actual Result

The actual text shown is Medium which is the text of the empty option

Version

2.3.0

Testcase

https://jsfiddle.net/jk0abk4f/1/

Case 2

I have the placeholder set to false and the action to hide I set the value of the selected item as the value of the value attribute on the hidden input

Expected Result

The placeholder should be Table size as i did put in the .text span

Actual Result

The actual text shown is Small which is the text matching the option (.item) with the small value

Version

2.3.0

Testcase

https://jsfiddle.net/raynr3c7/1/

y0hami commented 6 years ago

I can't see why this would be happening but to fix it if the values are semantic size class names you can add medium as the value it won't affect the size when added to a table.

shadoWalker89 commented 6 years ago

@hammy2899 I updated the issue with a second case. I didn't want to create issue since they are related

lubber-de commented 3 years ago

Fixed in the community fork Fomantic-UI See your adjusted jsfiddles here Case 1: https://jsfiddle.net/lubber/h3c4Levg/ Case 2: https://jsfiddle.net/lubber/7q6j1tof/