0

Trying to get just the basic semantic-ui-react Dropdown working, I can't seem to figure out how to prevent the placeholder to take on the value of the first option when the Dropdown is opened. Is it even possible?

A Pen with an example here: http://codepen.io/pzurek/pen/mRJMov

AnApprentice
  • 97,752
  • 174
  • 583
  • 971
Piotr Zurek
  • 2,583
  • 1
  • 23
  • 32

1 Answers1

1

Author of SUIR here. The Dropdown is modeled after the core SUI Dropdown. There are two states for an item, selected and active. A selected item is highlighted and can be changed with keyboard navigation, while an active item is the chosen value. The Dropdown changes the placeholder to show the user what item is currently selected (highlighted) for clarity as blurring the Dropdown will then make the selected item active (the chosen value).

SUI core examples for comparision: http://semantic-ui.com/modules/dropdown

P.S. I see a discrepancy in SUIR where our component changes the placeholder rather than the actual text as in SUIR core. You can also follow more on this question and design considerations here:

https://github.com/Semantic-Org/Semantic-UI-React/issues/1299

levithomason
  • 300
  • 2
  • 3