fomantic / Fomantic-UI

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

fix(dropdown): set placeholdertext regardless of values #3128

Open lubber-de opened 3 days ago

lubber-de commented 3 days ago

Description

In situations where values are given for a dropdown, but the list is empty (or no value is selected), and also allowAdditions:true is set, a given placeholder wont be shown. That's because internally the dropdownlist does not get cleared when allowAdditions is true which also does not (re-)set the placeholder.

By always trying to show a placeholder this situation gets fixed.

Testcase

Broken

https://jsfiddle.net/mkov7swt/

Fixed

https://jsfiddle.net/lubber/ws65erf2/12/

Closes

3127