question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropdown: placeholder value

See original GitHub issue

Steps

  1. Open codepen.
  2. Click on Dropdown element, it’s value will be set to Category 1
  3. Click outside, Dropdown’s value will be again Category

Expected Result

Until Dropdown’s item will be selected, keep placeholder as Category.

Actual Result

After you click on Dropdown it changes value to first option.

Version

Latest.

Testcase

http://codepen.io/pzurek/pen/mRJMov


@levithomason I’m not sure that this behaviour is bug. Can you clarify?

Based on stackoverflow question.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
layershiftercommented, Aug 28, 2017

@levithomason I reopened this issue because it wasn’t fixed and I want to pick up it.

1reaction
levithomasoncommented, Jul 18, 2017

I believe this is the expected behavior and in line with SUIR core: http://semantic-ui.com/modules/dropdown#dropdown

http://g.recordit.co/fYXZZvw6KX.gif

The difference we have is that the dropdown is not making Category 1 active on blur, whereas, SUIR core would. We are also changing the placeholder rather than the text. This makes our interaction more jarring than SUIR core.

Proposals, on selected (highlighted) item change:

  • change the text, not the placeholder, for selection
  • change the placeholder only for search Dropdowns
  • do not change text for regular Dropdown menus

(I responded on SO as well)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I make a placeholder for a 'select' box? - Stack Overflow
Building upon MattW's answer, you can make the select placeholder option visible in the drop-down menu after a valid ...
Read more >
How to Create a Placeholder for an HTML5 <select> Box
Here is the second method of adding a placeholder for your select box. First, you need to create your select items with the...
Read more >
How to Make a Placeholder for a Select Box in HTML
Answer: Use the disabled and selected Attribute. There is no attribute like input's placeholder for select box dropdown. However, you can create similar...
Read more >
How to make a placeholder for a 'select' box? - GeeksforGeeks
There is no placeholder attribute in 'select' tag but it can make the placeholder for a 'select' box. There are many ways to...
Read more >
HTML Select Placeholder: How To Create It Using HTML
The HTML select placeholder is an attribute that does not exist, which means that you can not use the placeholder attribute with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found