Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide the placehoder from the dropdown choices list #843

Open
HectorLS opened this issue Mar 26, 2020 · 2 comments
Open

Hide the placehoder from the dropdown choices list #843

HectorLS opened this issue Mar 26, 2020 · 2 comments

Comments

@HectorLS
Copy link

HectorLS commented Mar 26, 2020

"choices.js": "^7.0.0"

Hello!

Case scenario:

Common behaviour where the placeholder is not able to be selected from the dropdown list:

  • placeholder should only be visible on page load
  • after user select something else, it won't be able to select the placeholder back again

Base on the rule that placeholder value is an empty string -> placeholder value = ''

Is there any feature about this ? like placeholderSelectable: true/false or some idea to achieve this easily 🤔 ?

Thanks in advance

@ksouthworth
Copy link

I'm also dealing with this issue, does anyone have a solution or a workaround?

@veacks
Copy link

veacks commented Jan 26, 2023

I have found the following simple CSS workaround

.choices__list--dropdown .choices__placeholder {
  display: none;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants